[stringtemplate-interest] ST4: What encoding is used for the Java files

Terence Parr parrt at cs.usfca.edu
Mon Apr 4 17:14:06 PDT 2011


made it:

        // Polish uses ' ' (ASCII 160) for ',' and ',' for '.'
        String expecting = "-2\u00A0100 3,142";

Ter

On Mar 29, 2011, at 2:37 AM, Udo Borkowski wrote:

> Maybe a better way to write the expected string in TestRenderers.testLocaleWithNumberRenderer is to use the "\u…." notation in the string rather than typing the non-ascii character directly. 
> 
> This way we don't have to deal with encoding of Java files.
> 
> This would look like:
> 
>         String expecting = " -2\u00A0100 3,142 "; // Unicode 00A0: NO-BREAK SPACE
> 
> 
> Udo
> 
> On 29.03.2011, at 10:47, Udo Borkowski wrote:
> 
>> TestRenderers.testLocaleWithNumberRenderer contains a non-ASCII chars (>127) in the 'expecting' string.
>> 
>> Using the UTF-8 encoding for the Java file results in a failure in the assertEquals, also ISO-8859-1 and ISO 8859-15.
>> 
>> What encoding is used for the Java files?
>> 
>> 
>> Udo
>> 
>> P.S.: I got the files from github.
>> 
>> _______________________________________________
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
> 
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest



More information about the stringtemplate-interest mailing list