Last active
June 14, 2018 14:33
-
-
Save tallesairan/2640b695b2fe03590038af91ae45c46d to your computer and use it in GitHub Desktop.
Detect encoding of string using Multibyte snippet created to test Oracle strings #oracle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$text = "A strånge string to pass, maybe with søme ø, æ, å characters."; | |
foreach(mb_list_encodings() as $charset){ | |
echo mb_convert_encoding($text, 'UTF-8', $charset)." : ".$charset."<br>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment