php - iconv Detected an illegal character in input string -
i don't know chinese language. faced problem using these codes:
iconv('utf-8', 'gb2312', '在世界自由软件日给中国自由软件爱好者的视');
runs ok no problem.
and one:
iconv('utf-8', 'gb2312', '冠軍集團安心居台北旗艦總店開幕酒會暨記者會');
which causes error:
message: iconv(): detected illegal character in input string
both chinese what's difference?
your second string not gb2312 encode, it's big5 encoding.
so, should use 'gbk' 'from encoding' instead, covers gb2312 , big5.
Comments
Post a Comment