On Sun, 2002-11-03 at 14:42, Andrew C. Oliver wrote:
> After upgrading to Redhat 8.0 I have a number of unit tests failing (you
...
> centered around java.lang.String behaving differently.  Could this be a
> result of the default encoding changing between 7.3 and 8.0?  If
> so...from what to what?

Yes, the default encoding has become utf-8, for non-CJK (??) locales.

> Here is an example of something that has changed:
...
>         byte[] expected_output =
>         {
>             ( byte ) 'H', ( byte ) 'e', ( byte ) 'l', ( byte ) 'l',
>             ( byte ) 'o', ( byte ) ' ', ( byte ) 'W', ( byte ) 'o',
>             ( byte ) 'r', ( byte ) 'l', ( byte ) 'd', ( byte ) 0xAE
>         };

In the iso8859-1 locale, 0xAE is a valid byte character.  In the UTF-8
locale, it is not.

If the authors are testing character conversion routines, they really
need to be testing in either a fixed locale, or according to the rules
of the current one.  Assuming that Java's Unicode will always convert to
0xAE is wrong.




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to