iconv可以将ö(odiaeresis)等特殊字符转换为o等ascii字符。是否有某个字符表列出了这些转换的工作原理?我已经在source code附近戳了戳但是我不熟悉c来找到我正在寻找的东西。
答案 0 :(得分:1)
该表在文件translit.def
中定义。您可以在libiconv中找到它。该库可以从以下位置下载:https://ftp.gnu.org/gnu/libiconv/。我提取了表格的前几行,显示在下面:
# 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
,依此类推...