[fedora-java] Java 7 can't understand some chars

Deepak Bhole dbhole at redhat.com
Mon Nov 21 21:30:56 UTC 2011


* Ismael Olea <ismael at olea.org> [2011-11-21 15:00]:
>    Hi:
> 
>    I've updated OmegaT for F15 and F16[1] without novelty. But compiling
>    in rawhide showed a strange to me error: «error: unmappable character
>    for encoding ASCII»[2].
> 
>    In a first approach the suspects were some strange coded chars (which
>    1.6 can eat, btw) but after patching them I found in local tests the
>    same error with the 'ß' letter [3]. The file codification seems to be
>    common UTF-8.
> 
>    I'm not a programmer at all but this sounds _very_ weird to me. Is
>    anybody aware if openjdk 1.7 has some bug related with UNICODE or
>    similar? I didn't find anything like this in BZ. Any other idea?
> 

Hi Ismael,

This is expected behaviour with Java 7. Until Java 6, encoding errors
were only presented as warnings. Now they are errors:

http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html

"This is the default value. No language changes were introduced in Java
SE 6. However, encoding errors in source files are now reported as
errors, instead of warnings, as previously."

You can get around it by specifying -source 1.6, but fixing the source
is a better fix IMO.

Cheers,
Deepak


More information about the java-devel mailing list