gcj fails to compile with LANG=ja_JP.eucJP. For example, building pdftk fails, with gcc 4.5.0(20100401). The error occurs arround if (value.startsWith("\"")) Here is an output: /usr/local/bin/gcj45 -L/usr/local/lib -O2 -w --encoding=UTF-8 --classpath="/usr/ports/print/pdftk/work/pdftk-1.41/java_libs" -c Anchor.java -o Anchor.o /usr/ports/print/pdftk/work/pdftk-1.41/java_libs/com/lowagie/text/markup/MarkupParser.java:186: error: String literal is not properly closed by a double-quote if (value.startsWith("�§) ^^^ /usr/ports/print/pdftk/work/pdftk-1.41/java_libs/com/lowagie/text/pdf/BaseFont.java:201: error: Invalid character constant public static final char CID_NEWLINE = 'Œ†ff'; ^^^^^^^^ /usr/ports/print/pdftk/work/pdftk-1.41/java_libs/com/lowagie/text/pdf/BaseFont.java:1106: error: Invalid character constant for (char c = 'ˆ´4b'; c <= 'ˆ´58'; ++c) Escape charactor may not be treated correctly. building with LANG=C does not generate this problem. gcc 4.2.5 does not generate this problem.
Created attachment 21004 [details] sample code This is a test code to generate error. gcc-4.2.5 20090325 generates no error. gcc-4.5.1 20100617 generates error with LANG=ja_JP.eucJP, but no error with LANG=C. Here are errors: localetest.java:3: error: Syntax error on token "test", ; expected String str = "ÿÿtest"; ^^^^ localetest.java:3: error: Syntax error, insert ")" to complete MethodInvocation if (str.startsWith("ÿÿ")) ^^^ localetest.java:3: error: Syntax error, insert ") Statement" to complete IfStatement if (str.startsWith("ÿÿ")) ^^^ localetest.java:3: error: Syntax error, insert ")" to complete MethodInvocation System.out.println("start with ÿÿ"); ^^^^^^^^^^^^^^ localetest.java:3: error: Syntax error, insert ";" to complete Statement System.out.println("start with ÿÿ"); ^^^^^^^^^^^^^^ 5 problems (5 errors)
Closing as won't fix as the Java front-end has been removed from the trunk.