UTF-8 to GBK encoding problems, what are the good solutions? Iconv must be added with the IGNORE parameter to complete the conversion. Otherwise, an error will be terminated. while mb_convert_encoding can complete the conversion, but sometimes the converted file will replace the Chinese comments ???.
I developed the system is the UTF-8 version, the release of the need to convert a GBK version, there is no good solution, please help.
Reply to discussion (solution)
Do you know which characters cannot be converted?
Now, can we solve this problem?
You may post a base64 encoded string containing non-convertible characters.
The content is not fixed. a PHP program of utf8 version is developed, and the entire directory is converted to GBK. baidu has searched a lot and the blank separator of UTF8 cannot be converted to GBK.
Can't you find it? Since you have found that transcoding is not the same as your problem, isn't it the same string?
Or you can create a paragraph, as long as it contains characters that cannot be transcoded.
It turns out that I am wrong. the original file is saved in ANSI encoding, and this problem occurs only after conversion.