Bug#542146: Why can't the user implement this themselves
Nicholas Bamber
nicholas at periapt.co.uk
Mon Oct 4 08:57:53 UTC 2010
I have found a reference to punycode here:
http://en.wikipedia.org/wiki/Punycode.
I have found that what the user means by getting it right is that when
he clicks on the second link he gets to the same
location as the first.
I have found several perl modules that implement punycode. The first one
I picked is Encode::Punycode. Using this I was able to write the
following code:
use Encode;
use Encode::Punycode;
use utf8;
print encode('Punycode', 'http://www.中時健康.tw/'), "\n";
and I got the output:
http://www..tw/-vz3x59ynj1eh73a
I can check that this URL does not work in firefox. Nor when I try to do
the reverse do I get a satisfactory result:
use Encode;
use Encode::Punycode;
print decode('Punycode', 'http://www.xn--fiqx7ci2wwkh.tw/'), "\n";
returns the error message
invalid digit in input for decode_punycode at
/usr/local/share/perl/5.10.0/Encode/Punycode.pm line 25
I think before this could be sent upstream it would help to have a
clearer description of how it is supposed to work,
a suitable tool to to do the translation and a reason why it needs to be
implemented in the distribution and not on top of it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nicholas.vcf
Type: text/x-vcard
Size: 194 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20101004/3ddbcb39/attachment-0001.vcf>
More information about the pkg-perl-maintainers
mailing list