how to get list of supported encodings by iconv library in php?

前端 未结 3 1409
日久生厌
日久生厌 2020-12-06 09:54

Is it possible like in the mcrypt library with function mcrypt_list_algorithms(). Is there a iconv_list_encodings like function ?

3条回答
  •  时光说笑
    2020-12-06 10:14

    If using GLIBC's iconv, the list of encodings and aliases is usually in:

    /usr/lib/gconv/gconv-modules
    

    If using Debian multiarch, it will instead be in:

    /usr/lib/x86_64-linux-gnu/gconv/gconv-modules
    

    Note that aliases for ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE are not listed there.

提交回复
热议问题