The difference between Libiconv and glibc transcoding

Source: Internet
Author: User
Tags phpinfo
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 complete
Another machine phpinfo information is as follows:
Iconv Implementation GLIBC
In this way, the Iconv transcoding content is incomplete, although the Ignore parameter is turned on. Swap with mb_convert_encoding function, the content is complete.
How can i solve this problem? At least you can think of a way, which machine installed glibc which installed Libiconv, and then make a judgment, choose a different transcoding function it?


Reply to discussion (solution)

I'm guessing you're under *nix.

Reference
Http://rd.189works.com/article-38990-1.html

In the final analysis is the problem of the Code table, when necessary to do their own code table is

I'm guessing you're under *nix.

Reference
Http://rd.189works.com/article-38990-1.html

In the final analysis is the problem of the Code table, when necessary to do their own code table is

I also said, with mb_convert_encoding function can certainly solve ah, the key is that you have to determine when to use the Mb_convert_encoding function first, when the first use of iconv function, priority affirmation with the ICONV function, because of high efficiency, not to mention Mb_ Convert_encoding also has its own little flaws.

Reference to the 1 floor snmr_com reply: estimated that you are *nix under the

Reference
Http://rd.189works.com/article-38990-1.html

In the final analysis is the problem of the Code table, when necessary to do their own code table is

I also said, with mb_convert_encoding function can certainly solve ah, the key is you have to decide when to use the Mb_convert_encoding function first, when first use Iconv letter ...

According to that method, estimate is to judge the operating system, Linux first use Mb_convert_encoding,window first with iconv, but this is a perfect solution?

GLIBC is the GNU published LIBC library, the C runtime library. GLIBC is the lowest-level API in a Linux system, and almost any other runtime relies on glibc. GLIBC In addition to encapsulating the system services provided by the Linux operating system, it also provides many other necessary functional services. Because GLIBC includes almost all of the UNIX standards, you can see its content pack delectable. As with other UNIX systems, the included archives are scattered across the system's tree-like structure, and the entire operating system is generally propped up as a scaffold. In the Gnu/linux system, its C function library history points out several important milestones of gnu/linux evolution, and using glibc as the C function library of the system is an important milestone of gnu/linux evolution.

About LIBICONV History
For historical reasons, internationalized writing often uses different codes for linguistic or national reasons. With the advent of the Internet era, the text exchange through the Internet has gradually increased: Browse foreign sites, this time the conversion of character encoding becomes particularly important. This brings up the problem that many characters are not in one encoding mode. To address this confusion, Unicode encoding is established. Unicode is a super-encoding that contains all of these encoded character sets, so some new text formats like XML default encoding is Unicode.
But many old-fashioned computers are still using the local traditional character encoding method. Some programs, such as mail programs and browsers, must be able to convert between these different user encodings. Some of the other programs have built-in support for Unicode to successfully support internationalized processing, but there is still a need to convert between Unicode and other traditional encodings. The GNU Libiconv is the Code conversion library designed for both applications.

  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.