help-libidn
[Top][All Lists]
Advanced

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

Re: AW: PATCH: broken handling of alternate separators in java


From: Simon Josefsson
Subject: Re: AW: PATCH: broken handling of alternate separators in java
Date: Thu, 16 Nov 2006 17:40:05 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux)

Thanks, Stephane.  Installed in CVS.

/Simon

"Stephane Mikaty" <address@hidden> writes:

> This syntax is only recognized from java 1.5, and not supported by gcj (yet).
>
> Replace with:
>
>         for ( int i = 0; i < tests.length ; i++ ) {
>             assert IDNA.toASCII( tests[i] ).equals( "domain.invalid" );
>         }
>
> -----Ursprüngliche Nachricht-----
> Von: Simon Josefsson [mailto:address@hidden
> Gesendet: Donnerstag, 16. November 2006 16:04
> An: Stephane Mikaty
> Cc: address@hidden
> Betreff: Re: PATCH: broken handling of alternate separators in java
>
>
> "Stephane Mikaty" <address@hidden> writes:
>
>> +import gnu.inet.encoding.*;
>> +
>> +public class IDNATest {
>> +
>> +    public static void main( String[] args ) throws Exception {
>> +        String[] tests = new String[] {
>> +            "domain\u3002invalid",
>> +            "domain\uFF0Einvalid",
>> +            "domain\uFF61invalid",            
>> +        };
>> +        for ( String test : tests ) {
>> +            assert IDNA.toASCII( test ).equals( "domain.invalid" );
>> +        }
>> +    }
>> +
>> +}
>
> When I tested this part of the patch (which is now merged with
> TestIDNA.java in CVS), I got errors from gcj:
>
> TestIDNA.java:57: error: Invalid declaration.
>       for ( String test : tests ) {
>
> I'm not a Java programmer, is your syntax correct here?
>
> /Simon




reply via email to

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