IDN : wrong punycode

6 posts / 0 new
Last post
#1 Thu, 12/05/2013 - 05:42
jlegal

IDN : wrong punycode

Hi from France,

I'm using Virtualmin 4.04 GPL (with Webmin 1.660) and have an issue with IDN. When I create cléore.fr, Virtualmin generates xn--clore-dha5p.fr, instead of xn--clore-csa.fr.

The only way I've find to obtain the right punycode is by using virtualmin CLI and iconv :

[code]
domain=`echo cléore.fr | iconv --from-code=UTF-8 --to-code=ISO-8859-1`
virtualmin create-domain --domain $domain --alias masterdomain.tld --features-from-plan;
[/code]

I wrote a tiny perl script which use IDNA::Punycode library from /usr/share/webmin/virtual-server, and the result is wrong too :
[code]
#!/usr/bin/perl
#

use strict;
use warnings;
use IDNA::Punycode;

my $str = 'cléore.fr';
print "$str => ". encode_punycode($str);
[/code]

Output: cléore.fr => xn--clore.fr-vka3x

I run Debian 7 with fr_FR.UTF-8 encoding, and webmin is configure with lang=french.UTF-8.

Am I doing something wrong or is it a bug?

Thu, 12/05/2013 - 08:46
andreychek

Howdy,

I'll ask Jamie to take a look at your post, he may have a better idea of what's going on there.

-Eric

Fri, 12/06/2013 - 05:02 (Reply to #2)
jlegal

Hi,

Thanks andreychek :-))

Mon, 05/12/2014 - 08:08
jlegal

Hi there,

Do you have any news about this issue?

Many thanks, Jérôme

Mon, 11/17/2014 - 03:07 (Reply to #5)
dclee9

i'm also seeing this problem,

i have created a virtual host via WHMCS using 酷筆.商用.台灣

but inside virtualmin, it created

xn--fac0jpb6qja.xn--ga2ab2fvooa.xn--ba1azd6bxpoa

when it supposed to create

xn--9wzl86b.xn--czrw55e.xn--kpry57d

this language is Chinese Traditional Taiwan

Mon, 11/17/2014 - 21:51 (Reply to #6)
JamieCameron

How did you determine what the correct encoding was?

''

Topic locked