Reply to Re: I got two different results in linux and windows, need help!

Your name:

Reply:


Posted by Erwin Moller on 03/27/07 11:42

ripley wrote:

> function decode_msg($msg)
> {
> $tmp = "";
> $msg = iconv("gb2312", "UCS-2", $msg);
> $len = strlen($msg);
>
> for ($i = 0; $i < $len; $i++)
> $tmp .= sprintf("%02X", ord($msg[$i]));
>
> return sprintf("%02X", strlen($tmp)/2).$tmp;
> }
>
> echo decode_msg("??");
>
> windows:
> 044F60597D
>
> linux:
> 04604F7D59

Hi,

Did you read the fine manual?
http://www.php.net/manual/en/ref.iconv.php

It describes the unreliable behaviour and advise you to implement GNU libs.
In the usercontributed notes you can even find a link to a W$-version.

Regards,
Erwin Moller

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация