[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Jawi native toASCII error

From: Simon Josefsson
Subject: Re: Jawi native toASCII error
Date: Mon, 16 May 2011 14:18:06 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux)

"pk.chan" <address@hidden> writes:

> Hi Support,
> kindly find the attached for my brief bug report. Hope to hear from
> you soon.

Hi, and thanks for your report.  In the future, please avoid sending
information in proprietary formats like DOC.

It looks like the string is not valid in IDNA2003, and libidn only
implements IDNA2003, so it works as expected:

address@hidden:~$ idn تمس-لݢ۲.
idn: idna_to_ascii_4z: String preparation failed

Luckily, there is libidn2 which implements IDNA2008, see output:

address@hidden:~$ idn2 --debug تمس-لݢ۲.
Charset: UTF-8
input[0] = 0xd8
input[1] = 0xaa
input[2] = 0xd9
input[3] = 0x85
input[4] = 0xd8
input[5] = 0xb3
input[6] = 0x2d
input[7] = 0xd9
input[8] = 0x84
input[9] = 0xdd
input[10] = 0xa2
input[11] = 0xdb
input[12] = 0xb2
input[13] = 0x2e
UCS-4 input[0] = U+062a
UCS-4 input[1] = U+0645
UCS-4 input[2] = U+0633
UCS-4 input[3] = U+002d
UCS-4 input[4] = U+0644
UCS-4 input[5] = U+0762
UCS-4 input[6] = U+06f2
UCS-4 input[7] = U+002e
output[0] = 0xd8
output[1] = 0xaa
output[2] = 0xd9
output[3] = 0x85
output[4] = 0xd8
output[5] = 0xb3
output[6] = 0x2d
output[7] = 0xd9
output[8] = 0x84
output[9] = 0xdd
output[10] = 0xa2
output[11] = 0xdb
output[12] = 0xb2
output[13] = 0x2e
UCS-4 output[0] = U+062a
UCS-4 output[1] = U+0645
UCS-4 output[2] = U+0633
UCS-4 output[3] = U+002d
UCS-4 output[4] = U+0644
UCS-4 output[5] = U+0762
UCS-4 output[6] = U+06f2
UCS-4 output[7] = U+002e

It looks like the punycode output is the same as on VeriSign page.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]