[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
idn2 failed to convert
From: |
Tim Ruehsen |
Subject: |
idn2 failed to convert |
Date: |
Thu, 13 Dec 2012 17:07:58 +0100 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) |
Hi,
how can I convince 'idn2 -l' to accept an UTF-8 encoded domain from a file,
while the local encoding differs (it is ISO-8859-15) ?
file 'xx' contains 碼標準萬國碼.com:
$ CHARSET="utf-8" idn2 -l <xx
idn2: lookup: string contains a disallowed character
$ export LC_ALL="utf-8"; idn2 -l <xx
bash: warning: setlocale: LC_ALL: cannot change locale (utf-8): No such file
or directory
I guess a --encoding or --charset would be helpful or at least a hint/example
using CHARSET= in the man page.
BTW: I tried that libidn conversion page (http://josefsson.org/idn.php/...)
with the above domain and it doesn't seem to work:
Output
$ CHARSET='UTF-8' idn --usestd3asciirules --punycode-encode '.com' 2>&1
.com-
$
I tried it with current Iceweasel, the pasted URL from the navigation field is
(you won't see the %xx, but the chinese? characters from above):
http://josefsson.org/idn.php/?data=%E7%A2%BC%E6%A8%99%E6%BA%96%E8%90%AC%E5%9C%8B%E7%A2%BC.com&profile=Nameprep&mode=punyencode&usestd3asciirules=on&charset=UTF-8&lastcharset=UTF-8
If it matters, using libidn 1.25 idna_to_ascii_8z() results in the correct
punycode 'xn--9cs565brid46mda086o.com'.
Thanks and best regards,
Tim Rühsen
- idn2 failed to convert,
Tim Ruehsen <=