This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/24552] New: Encoding alias "EUC_JP" missing
- From: "hnakamur at good-day dot co dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2005 03:39:39 -0000
- Subject: [Bug libgcj/24552] New: Encoding alias "EUC_JP" missing
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The member variable named "hash" in the gnu.gcj.convert.IOConverter class
should have a map entry key named "EUC_JP".
The encoding alias "EUC_JP" is on the list of the Sun's document:
"Supported Encoding"
http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
So GCJ should support this encoding alias.
We need the encoding alias "EUC_JP" when we run a java program which connects
to a PostgreSQL database whose encoding is EUC_JP through the PostgreSQL JDBC
driver.
If you look at IOConverter.java source flie,
http://savannah.gnu.org/cgi-bin/viewcvs/gcc/gcc/libjava/gnu/gcj/convert/IOConverter.java#rev1.8
the variable named "hash" has two duplicated "euc-jp" entries.
It must be a mistake that one of those should be "euc_jp", I think.
Here is a patch to fix this problem:
--- libjava/gnu/gcj/convert/IOConverter.java.orig 2005-10-27
12:19:32.739262400 +0900
+++ libjava/gnu/gcj/convert/IOConverter.java 2005-10-27 12:19:56.593563200
+0900
@@ -65,7 +65,7 @@
hash.put ("extended_unix_code_packed_format_for_japanese", "EUCJIS");
hash.put ("cseucpkdfmtjapanese", "EUCJIS");
hash.put ("euc-jp", "EUCJIS");
- hash.put ("euc-jp", "EUCJIS");
+ hash.put ("euc_jp", "EUCJIS");
hash.put ("utf-16le", "UnicodeLittle");
hash.put ("utf-16be", "UnicodeBig");
iconv_byte_swap = iconv_init ();
--
Summary: Encoding alias "EUC_JP" missing
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hnakamur at good-day dot co dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24552