Use the Iconv method for encoding conversions. It works fine under the Windows platform (Win7 used by the local environment), but Iconv always returns false under the Linux environment (the Linux used by the test environment).
Referring to the Phpinfo information, the Iconv module has also been loaded correctly.
Google a bit. Originally only know, originally in the Linux version Iconv this method still a bit under the question.
One of the solutions offered by a netizen on CSDN is:
One way is to replace Iconv with Mb_convert_encoding.
Another way is to modify the Iconv implementation, from GLIBC to Libiconv
Have a half-day, irritability!
If you have a friend, you can solve it.
According to the first method provided by the Netizen, the Iconv method is modified to use mb_convert_encoding, which is done.
Thanks for the solution provided by the Netizen.
Download: ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.8.tar.gz
Installation:
#cp LIBICONV-1.8.TAR.GZ/USR/LOCAL/SRC
#tar ZXVF lib*
#./configure--prefix=/usr/local/libiconv
#make
#make Install
Compiling PHP
#./configure--prefix=/usr/local/php4.3.2--with-iconv=/usr/local/libiconv/
Simple examples of use:
Echo iconv ("gb2312", "iso-8859-1", "we");
http://www.bkjia.com/PHPjc/631324.html www.bkjia.com true http://www.bkjia.com/PHPjc/631324.html techarticle Use the Iconv method for encoding conversions. It works fine under the Windows platform (Win7 used by the local environment), but Iconv always returns false under the Linux environment (the test environment uses ...