开发者

Translating non-latin characters from a latin only system

Apologies if this has already been answered previously...

We've got an online mail reader (php based) that currently substitutes "�" or the upright rectangle for non-latin based characters in a window where the message body is loaded via an iframe. The texts are generally stored base64 encoded, so my question is, are there online translation tools that I can send the base64 encoded string that will decode the string, translate it, and return the translation (either base64 or decode开发者_运维技巧d makes no difference)?


base64_encode(mb_convert_encoding(base64_decode($string), 'charset1', 'charset2'));

you'd have to fill in appropriate values for the two character sets. however, you should be storing/processing/ouputting everything using UTF-8, as it makes so many of these kinds of problems simply vanish.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜