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

Deepak Bhole dbhole at redhat.com
Tue Nov 22 00:41:29 UTC 2011


* Ismael Olea <ismael at olea.org> [2011-11-21 18:50]:
>    On Mon, Nov 21, 2011 at 10:30 PM, Deepak Bhole <[1]dbhole at redhat.com>
>    wrote:
> 
>      This is expected behaviour with Java 7. Until Java 6, encoding
>      errors
>      were only presented as warnings. Now they are errors:
>      [2]http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java
>      c.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."
> 
>    Aha
> 
>      You can get around it by specifying -source 1.6, but fixing the
>      source
>      is a better fix IMO.
> 
>    Thanks for the tip! I fixed it[1]
>    btw, which is the default encoding for openjdk?

It is set by the system. You can check for it by printing the
file.encoding system property. On Fedora, it should default to UTF-8.

Cheers,
Deepak

>    [1] [3]http://koji.fedoraproject.org/koji/taskinfo?taskID=3530965
> 
>    --
>    Ismael Olea
>    [4]http://olea.org/diario/
> 
> References
> 
>    1. mailto:dbhole at redhat.com
>    2. http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html
>    3. http://koji.fedoraproject.org/koji/taskinfo?taskID=3530965
>    4. http://olea.org/diario/


More information about the java-devel mailing list