PHP BUG with mb_convert_encoding EUC-JP and UTF-8

This doesn’t work properly:
mb_convert_encoding($japtext, “UTF-8″, “EUC-JP”)

Instead you have to do this:
mb_convert_encoding(mb_convert_encoding($japtext,”sjis-win”,”EUC-JP”),”UTF-8″,”sjis-win”)

Strange but true. If you have any better solution, tell me.

Source:

http://www.asp-edita.jp/doda/one/doda5728_15.html

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.