2

I don't know chinese language. But I faced problem using these codes:

iconv('UTF-8', 'GB2312', '在世界自由软件日给中国自由软件爱好者的视');

runs ok with no problem.

and this one:

iconv('UTF-8', 'GB2312', '冠軍集團安心居台北旗艦總店開幕酒會暨記者會');

which causes error:

Message: iconv(): Detected an illegal character in input string

Both are chinese but what's the difference?

monjevin
  • 177
  • 2
  • 3
  • 11

1 Answers1

1

Your second string is not GB2312 encode, it's BIG5 encoding.

So, you should use 'GBK' as 'from encoding' instead, which covers GB2312 and BIG5.

Fwolf
  • 671
  • 4
  • 8