I have some problems with PHP mb_detect_encoding function. I can not convert it to ISO-8859-1. Any help?
The code:
$str = "åäö"; $encoding = mb_detect_encoding($str); echo $encoding; $encoding = mb_detect_encoding(mb_convert_encoding($str, "ISO-8859-1")); echo $encoding;
Conclusion:
Utf-8Utf-8
Utf-8
Updated solution:
I updated mb_detect_order to an array ('UTF-8', 'ISO-8859-1') and it worked.
. , mb_convert_encoding , UTF-8. , ISO-8859-1 ( -). , , mb_detect_encoding, bin2hex . , .
mb_convert_encoding
mb_detect_encoding
bin2hex
, ( ) . :
mb_convert_encoding($str, 'ISO-8859-1','utf-8');
, , .
mb_detect_order ('UTF-8', 'ISO-8859-1'),