Search code examples
asciiglibciconv

iconv translit table of characters


iconv can convert special characters like ö (odiaeresis) to ascii characters like o when used with //TRANSLIT. Is there a table of characters somewhere that lists how those transformations work? I already poked around the source code but am not familiar enough with c to find what I'm looking for.


Solution

  • The table is defined in the file translit.def. You may find it inside the libiconv. The library might be download at: https://ftp.gnu.org/gnu/libiconv/. I've extracted the first few lines of the table, which are displayed bellow:

    # 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
     .
     .
     .
    

    You might see that ¡ (0x00A1) is translated into !, ¢ (0x00A2) is translated into c, £ (0x00A3) is translated into lb and so on...