iconv translit table 个字符

iconv translit table of characters

当与 //TRANSLIT 一起使用时,iconv 可以将 ö (odiaeresis) 等特殊字符转换为 o 等 ascii 字符。某处是否有 table 个字符列出了这些转换的工作原理?我已经浏览了 source code,但对 c 还不够熟悉,无法找到我要找的东西。

table 在文件 translit.def 中定义。您可能会在 libiconv 中找到它。该库可在以下位置下载:https://ftp.gnu.org/gnu/libiconv/。我提取了 table 的前几行,如下所示:

# Definition of transliteration from Unicode to poorer character sets.
#
# This covers all of Markus Kuhn's TARGET1.
#
# The second column gives the transliteration. It is enclosed between tabs!
#
00A0            # NO-BREAK SPACE
00A1    !       # INVERTED EXCLAMATION MARK
00A2    c       # CENT SIGN
00A3    lb      # POUND SIGN
00A4            # CURRENCY SIGN
00A5    yen     # YEN SIGN
00A6    |       # BROKEN BAR
00A7    SS      # SECTION SIGN
00A8    "       # DIAERESIS
 .
 .
 .

你可能会看到 ¡ (0x00A1) 被翻译成 !, ¢ (0x00A2) 被翻译成 c, £ (0x00A3 ) 被翻译成 lb 等等...