Re: Re: Character lost while convert from cp936 to utf-8 using mb_convert_encoding
| From: | Alexey Shein | Date: | Fri, 18 Nov 2011 09:03:45 +0000 |
| Subject: | Re: Re: Character lost while convert from cp936 to utf-8 using mb_convert_encoding | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56386@lists.php.net to get a copy of this message | ||
Well done! :)
2011/11/18 Laruence <laruence@php.net>:
> Hi:
>
> I have fixed the bug(it is a simple fix that I didn't expect before
> I look into it ), ignore me...
>
> thanks
>
> On Fri, Nov 18, 2011 at 1:09 PM, Laruence <laruence@php.net> wrote:
>> Hi:
>>
>> I have filed a bug about this issue:
>> https://bugs.php.net/bug.php?id=60306
>>
>> following script:
>>
>> <?
>> $s = "洪仁";
>> var_dump(mb_convert_encoding($s, "utf8", "gbk"));
>>
>> var_dump(iconv("gbk", "utf8", $s));
>> ?>
>>
>> save the script in fenc=cp936
>>
>> then, run the script in php5.4 , output is :
>>
>> string(3) "洪"
>> string(6) "洪仁"
>>
>> characters lost while converting from cp936 to utf8. this is really a big
>> problem.....
>>
>>
>> thanks
>> --
>> Laruence Xinchen Hui
>> http://www.laruence.com/
>>
>
>
>
> --
> Laruence Xinchen Hui
> http://www.laruence.com/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Regards,
Shein Alexey