Bug 14358 - Selection of default encoding is not sufficient with EUC-JP on FreeBSD
Summary: Selection of default encoding is not sufficient with EUC-JP on FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 3.3.3
: P2 normal
Target Milestone: 4.0.3
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-01 08:40 UTC by NIIMI Satoshi
Modified: 2005-11-04 15:09 UTC (History)
3 users (show)

See Also:
Host: i386-portbld-freebsd4.9
Target: i386-portbld-freebsd4.9
Build: i386-portbld-freebsd4.9
Known to work:
Known to fail:
Last reconfirmed: 2005-10-31 17:51:35


Attachments
Patch file for libjava/gnu/gcj/convert/IOConverter.java (233 bytes, patch)
2004-03-01 09:12 UTC, NIIMI Satoshi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description NIIMI Satoshi 2004-03-01 08:40:15 UTC
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 ();
   }
Comment 1 Andrew Pinski 2004-03-01 08:43:42 UTC
Confirmed.
Comment 2 NIIMI Satoshi 2004-03-01 09:12:45 UTC
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.
Comment 3 Andrew Pinski 2004-05-31 00:37:08 UTC
Please send your patch to gcc-patches@ and java-patches@ after reading <http://gcc.gnu.org/
contribute.html>.
Comment 4 Tom Tromey 2005-10-31 17:51:35 UTC
I'll handle this.
Comment 5 Tom Tromey 2005-11-04 15:08:25 UTC
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

Comment 6 Tom Tromey 2005-11-04 15:09:12 UTC
Fix is on 4.0 branch and trunk.