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 cléore.fr, instead of cléore.fr.

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

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;

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

#!/usr/bin/perl
#

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

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

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?

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

Hi,

Thanks andreychek :-))

Hi there,

Do you have any news about this issue?

Many thanks,
Jérôme

i’m also seeing this problem,

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

but inside virtualmin, it created

酷筆.商用.台灣

when it supposed to create

酷筆.商用.台灣

this language is Chinese Traditional Taiwan

How did you determine what the correct encoding was?