Use Android NDK to compile libxml2 and libiconv libraries simultaneouslyFirst, make preparations. follow the steps below to create a directory and prepare the libiconv and libxml2 compressed files.(The version I use here is: libiconv-1.14.tar.gz
Problem:
A lamp server running on line, PHP does not support iconv functions.
Workaround:
Install LIBICONV, recompile Apache, enable PHP to support Iconv functions, implement UTF-8 and gb2312 encoded conversions.
Specific steps:
1, download
Today, a netizen asked me when he compiled a file, prompted LIBICONV.A file can not find, and then QQ message:
Here is a first premise to explain: for our technical developers, it is advisable to put what is. A, what is. So what's the matter. Lo
Character Set conversion is inevitable in software development. Many conversion methods, such as writing character set conversion libraries and usingProvided by WindowsMultibytetowidechar function; it takes a long time to compile the
Libiconv is an open-source library that provides transcoding functions across platforms. It provides a conversion function: iconv () to implement conversion between different encodings, the libxml2 library compilation on the Android platform
In fact, I have installed libiconv before installing PHP and installed it in the usrlocallibiconv directory. Later, the parameters for PHP compilation also contain -- with-iconv-dirusrlocallibiconv. However, after php is installed, iconv printed by
Compile libiconv in CentOS 7
Compile and install libiconv
Cd/usr/local/src
Wgethttp: // ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
Tar xfz libiconv-1.14.tar.gz
Cd libiconv-1.14
./Configure -- prefix =/usr/local/libiconv
Make
Make install
Cd ..
In fact, I have installed the libiconv before installing PHP, installed in the/usr/local/libiconv directory. Later compile PHP parameters inside also have--with-iconv-dir=/usr/local/libiconv, but after installing PHP, through phpinfo print out of
Today, an rsync of the source code package is installed, and an error is reported during startup.
#/Usr/local/rsyncd/bin/rsync -- help/usr/local/rsyncd/bin/rsync: Error while loading shared libraries: libiconv. so.2: cannot open shared object file:
Install and use the libiconv Library in Linux: 1. Compile and install the libiconv library package on the download page. Reprinted from: h
Install and use the libiconv Library in Linux:
1. Compile and install the libiconv Library
Package download
The difference between libiconv and glibc is the same article. I prefer iconv function for transcoding, while mb_convert_encoding function for backup.
The iconv information in the same article: phpinfo is as follows:
Iconv implementation
The following error occurred while compiling the PHP installation manually
/usr/local/src/php-5.3.10/ext/xmlrpc/libxmlrpc/encodings.c:73:undefined reference to ' Libiconv_open '
/usr/
In the same article, transcoding I prefer to use the ICONV function, mb_convert_encoding function to spare.
The same article: Phpinfo inside the iconv information as follows
Iconv implementation "Libiconv"
This uses Iconv transcoding content to
It is not clear which version of the NDK from the beginning of the fact that it has libiconv this conversion library, there is no need for three-party compilation!Specific Use method:A.cppextern "C" {#include }ANDROID.MK:Add the following
Use the libiconv library to handle character encoding and conversion in linux-general Linux technology-Linux programming and kernel information. For more information, see the following. The libiconv library is an open-source Library Based on the GNU
Download libiconv-1.11.1.tar.gz source code from http://download.csdn.net/detail/pony12/7789079.First, compile the Win64 bit0. Transfer to command line cmd1, execute AMD64 bit script, D:\Program Files (x86) \microsoft Visual Studio
In libiconv Character Set conversion library usage, libiconv can be used to convert different character sets. For example, convert GBK to big5. Find this library as needed in the project. However, this library does not have good support in C.
LibiconvThis library provides a iconv () implementation, for use on the systems which don ' t have one, or whose implementation cannot C Onvert from/to Unicode.DownloadHttp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gzor here:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.