iconv: Ignore unrepresentable characters when transliterating
commit61f3f64c69320e47adf8a67e9069e546fe0c5f7a
authorJonas Fonseca <fonseca@diku.dk>
Mon, 5 Aug 2013 03:36:58 +0000 (4 23:36 -0400)
committerJonas Fonseca <fonseca@diku.dk>
Mon, 5 Aug 2013 22:29:01 +0000 (5 18:29 -0400)
treea80ddd36f4a00eabc9b18d3524c48134508029a0
parent1eaf34b03d2ed8b38cbb3a76086e4b79511554f1
iconv: Ignore unrepresentable characters when transliterating

Certain characters where causing iconv() to fail, which resulted in
buggy rendering. By adding "//IGNORE" to the already existing
"//TRANSLIT" flag unrepresentable characters are automatically removed
from the resulting output.

    > echo "Nguyễn Thái Ngọc Duy" | iconv -f UTF-8 -t ASCII//TRANSLIT
    Nguy
    iconv: (stdin):1:4: cannot convert
    > echo "Nguyễn Thái Ngọc Duy" | iconv -f UTF-8 -t ASCII//TRANSLIT//IGNORE
    Nguyn Th'ai Ngc Duy
NEWS
tig.h