[Top][All Lists]

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

Re: toAscii method only allows length of upto 63 characters

From: Simon Josefsson
Subject: Re: toAscii method only allows length of upto 63 characters
Date: Tue, 16 May 2006 10:44:01 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

"Lokesh Bathija" <address@hidden> writes:

> Hi .....
> I am using Libidn library. In class the method
> public static String toASCII(String input, boolean allowUnassigned,
> boolean useSTD3ASCIIRules) restricts the length of the input to only
> 63 characters.
> i.e. if (output.length() < 1 || output.length() > 63) {
>      throw new IDNAException(IDNAException.TOO_LONG);
>    }
> Can somebody tell the reason for hardcoding the length to 63 over
> here. If we increase the length would it cause any problem.

Hi Lokesh, thanks for your interest in LibIDN!

First a minor correction, it is the output that is restricted to 63
characters, and not the input.  The reason is that RFC 3490 requires
this behaviour, see:

   8. Verify that the number of code points is in the range 1 to 63

If you remove that check, you won't be compatible with the IDNA
specifications any more.

If this causes you problems, please describe more in detail what you
are attempting to do.  If it is a valid problem, it may be brought up
with the folks who designed IDNA.


reply via email to

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