Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 1999 21:11:59 +0900
From:      "Daichi T.GOTO" <daichi@ongs.net>
To:        freebsd-java@FreeBSD.ORG
Subject:   Re: About Japanese problem with Swing.
Message-ID:  <19990110211159X.daichi@ongs.net>
In-Reply-To: <199812301642.JAA04998@mt.sri.com>
References:  <19981230185745U.daichi@ongs.net> <199812301642.JAA04998@mt.sri.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>From Daichi.

From: Nate Williams <nate@mt.sri.com>
Subject: Re: About Japanese problem with Swing.
Date: Wed, 30 Dec 1998 09:42:11 -0700

> > Now I am useing Swing 1.1 with jdk1.1.7 on FreeBSD 3.0 Release.
> > This is very good. I can use Japanese Charactors(EUC) as labels, but
> > cannot use it in JTextArea and JEditorPane. Why?  Is this an especialy
> > problem of FreeBSD or original bug of Swing?
> 
> I'm not sure.  The only way to know is to try it on the reference
> platform (Solaris) and see if it works there.  It's possible that it's a
> FreeBSD specific bug, but I doubt it.

We (freebsd-users-jp mailing list menbers) found the cause of this
problem. JDK1.1.7 does mistakes to get the locale informations. For
example, 

-----------------------
the environment values:

LANG=ja_JP.EUC
LC_MESSAGES=ja_JP.EUC
LC_ALL=ja_JP.EUC

-----------------------
the source code:

import java.io.*;

class envalue {
	public static void main(String[] argv) {
		System.out.println(System.getProperties());
	}
}
-----------------------
the result:

{user.language=ja, java.home=/usr/local/old_jdk1.1.7, java.vendor.url.bug=mailto:java-port@FreeBSD.org, file.encoding.pkg=sun.io, java.version=1.1.7, file.separator=/, line.separator=
, user.region=JP, file.encoding=8859_1, java.vendor=Sun Microsystems Inc., port by java-port@FreeBSD.org, user.timezone=JST, user.name=daichi, os.arch=x86, os.name=FreeBSD, java.vendor.url=http://www.freebsd.org/java/, user.dir=/usr/home/daichi/Develope/Java/develop/EnvironemtValue, java.class.path=.:/usr/local/java/lib/classes.zip:/usr/local/swing-1.1:/usr/local/swing-1.1/swingall.jar:/usr/local/old_jdk1.1.7/classes:/usr/local/old_jdk1.1.7/lib/classes.jar:/usr/local/old_jdk1.1.7/lib/rt.jar:/usr/local/old_jdk1.1.7/lib/i18n.jar:/usr/local/old_jdk1.1.7/lib/classes.zip, java.class.version=45.3, os.version=3.0-CURRENT, path.separator=:, user.home=/home/daichi}
-----------------------

The information "file.encoding=8859_1" is bad. That should be
"file.encoding=EUC_JP". Is this the espacially problem of FreeBSD
JDK1.1.7, or original JDK1.1.7 bug?  A Solaris user reported that he
uses JDK1.1.7 on Solaris2.x but could not find the same problem.

JDK 1.1.6 does good. And the early released JDK 1.1.7 does good.
Uhhmm. Can I solve this problem...  ?
----
 Daichi T.GOTO (ONGS)
    http://www.ongs.net/daichi, daichi@ongs.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990110211159X.daichi>