On FreeBSD 4.9, nl_langinfo(CODESET) returns "eucJP" when the LANG environment variable is "ja_JP.eucJP". Unfortunately this name is not registered as alias for "EUCJIS"; "8859_1" is selected as default encoding. fix: --- libjava/gnu/gcj/convert/IOConverter.java.orig Mon Sep 17 11:28:53 2001 +++ libjava/gnu/gcj/convert/IOConverter.java Mon Mar 1 17:24:11 2004 @@ -63,6 +63,7 @@ hash.put ("extended_unix_code_packed_format_for_japanese", "EUCJIS"); hash.put ("cseucpkdfmtjapanese", "EUCJIS"); hash.put ("euc-jp", "EUCJIS"); + hash.put ("eucJP", "EUCJIS"); iconv_byte_swap = iconv_init (); }
Confirmed.
Created attachment 5826 [details] Patch file for libjava/gnu/gcj/convert/IOConverter.java I'm sorry the fix in the description field is not correct. Please use this patch instead.
Please send your patch to gcc-patches@ and java-patches@ after reading <http://gcc.gnu.org/ contribute.html>.
I'll handle this.
Subject: Bug 14358 Author: tromey Date: Fri Nov 4 15:08:18 2005 New Revision: 106490 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106490 Log: PR libgcj/14358, libgcj/24552: * gnu/gcj/convert/IOConverter.java: Regenerate aliases. Add aliases for 'euc_jp' and 'eucjp'. * scripts/encodings.pl: Recognize 'none', not 'NONE'. Include canonical names in output. (%map): Added UnicodeLittle and UnicodeBig. Modified: trunk/libjava/ChangeLog trunk/libjava/gnu/gcj/convert/IOConverter.java trunk/libjava/scripts/encodings.pl
Fix is on 4.0 branch and trunk.