Punycode questions

Ronald F. Guilmette rfg at tristatelogic.com
Mon Sep 29 18:12:11 UTC 2014

In message <alpine.LSU.2.00.1409291026090.18897 at hermes-1.csi.cam.ac.uk>,
Tony Finch <dot at dotat.at> wrote:

>Ronald F. Guilmette <rfg at tristatelogic.com> wrote:
>> To be more specific and concrete about it, here is a small
>> example Perl program I wrote:
>>    ftp://ftp.tristatelogic.com/pub/punybug.pl
>> When *I* run this, it prints out several "Invalid punycode!"
>> errors.
>I think that is because the function you are calling is intended for
>encoding individual labels, not whole domain names.

Quite right sir!  Thanks for the tip!

Re-reading the man pages just now I see that I was using the
incorrect function for the conversion.  I was using the
Net::IDN::Punycode::encode_punycode but apparently I really
should instead be using Net::IDN::Encode::domain_to_ascii
which is apparently the thing that should be used for converting
complete domain names.

(Unfortunately, I've still got problems, even now that I'm using
the correct function, but those are probably due to me having
failed to upgrade my FreeBSD ports for some time now.)

More information about the bind-users mailing list