Renzo:
Thank you very much for your help and information. It's very helpful.
I'll send time to digest all of the information and give it a try.
Regards,
PS. This msg may not be able to be posted in the mail list. I don't know
why.
Lee
-----Original Message-----
From: Renzo Pecoraro [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 14, 2000 2:15 PM
To: [EMAIL PROTECTED]
Subject: Java-Linux I18N
Couple of hints on this.
So far, I haven't seen anything in Java I18N that's specific to Linux,
except:
1. Yes, you need Asian fonts. Some come with the distros, I got
additional ones from
http://www.userfriendly.net/linux/RPM/rhcn/noarch/X11_fonts.html
(Japanese, Simplified Chinese, Traditional Chinese, Korean) - these are
all RPMs
2. You do need to change you font.properties file in order to display
Asian in a Java program. But once you have that, you can display it,
even if your machine uses the Western European codepage (i.e.is set up
to behave as a Western European/US machine) - EXCEPT, as of pre-Swing,
TextField and TextArea will NOT display Asian, because these components
use native code (or for whatever reason). From what I understand Swing
components do not have that limitation. Now, there's a great site for
Japanese Linux at
http://hikari.tlug.gr.jp/~craigoda/writings/linux-nihongo/linux-nihongo.html
,
including references to Java, and most importantly a font.properties
file for Linux. I simply downloaded that file, dropped it into my
../jre/lib directory of Java installation and into
/usr/lib/netscape/java/classes for my netscape browser. BUT, if you
backup your existing font.properties file (as you would want to) to
java.properties.en (as it would logically be named), your JVM (of the
JRE or Netscape's) seems to still look up the fonts described in that
backed up file, if your machine's default Locale is English. So I backed
mine up to font.properties.ENGLISH (which the JVM apparently cannot map
to my machines Locale), and then it works beautifully - EXCEPT that some
Western European fonts are now not quite so pretty. Of course, you can
and probably should edit that font.properties file, but the one
downloaded from
http://hikari.tlug.gr.jp/~craigoda/writings/linux-nihongo/linux-nihongo.html
is a great starting point.
3. I am fairly certain that there is a way to switch the locale and
charset/codepage of your machine (hence the /etc/charset directory, I'd
think), but I haven't figured it out yet (although I will have to for a
project sometime soon).
4. From what I can tell, the rest is Java I18N as usual. See the I18N
Tutorial at http://java.sun.com/docs/books/tutorial/i18n/TOC.html. There
was also a three-part tutorial at http://www.javaworld.com at somepoint.
Take the first first example of that tutorial and add Japanese to the
choices ("ja", "JP") to allow you to test whether you have correctly
installed the font.properties file. If you did, you'll see Japanese
characters when you select Japanese in this applet (in appletviewer or
in the browser).
Hope this helps.
Renzo
> > [Lee]
> > I'm new in this area too (and new in Java-Linux as well). The issue of
> I18N
> > I have is very basic at this time. That is what we need and need to do
to
> > display Japanese and Chinese characters on a JButton on Linux.
> >
> > Q1: Do we need a Japanese/Chinese font packages?
> > Q2: If so, where to find the right font package for Linux?
> > Q3: After find the font package, how to use it to show a
Japanese/Chinese
> > character on a JButton?
> > Q4: Is there any Japanese/Chinese version of Linux like Windows NT does?
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]