Article View: borland.public.jbuilder.java.swing
Article #10259Re: Display Chinese Characters in JTextField or JTextArea etc
From: Kevin Wang
Date: Wed, 20 Oct 1999 00:00
Date: Wed, 20 Oct 1999 00:00
63 lines
2816 bytes
2816 bytes
Hi Lois
Thanks for the help. However, I still have few doubts if you don't mind:
1. All I'm doing is load characters from a text file and display them as
menu item names. I've tried writing some characters in Unicode
(for each character I used this style:: \u5C71), but when I load the
file in my Java application these characters showed up as question
marks (?). I had a Chinese viewer opend while I did this but
obviously it didn't work. You mentioned about providing chinese
font, do I have to do that, and how should I do that?
2. Is there a code mapping chart that shows the mapping of each
Chinese character (or characters of other language) to its
corresponding Unicode.
Thanks again
KW
Lois Neo wrote:
> I've not really tried that out, but I've seen examples on this which write
> the characters as Unicodes.
> If you write in Unicode, you just need to provide a chinese font for the
> component which displays the characters.
> I guess if you write in chinese characters, you will also need a chinese
> input software to be running along with your program in order for you to see
> the chinese characters. and not all chinese input software would work for
> this.
>
> Hope it helps.
> Lois
>
> Kevin Wang <kwang@mks.com> wrote in message news:380DC841.FE608D5@mks.com...
> > Hi Neo:
> >
> > I'm new to displaying other language characters so I have a simple
> question if
> > you can help it would be great!
> >
> > I'm trying to load a generic text file (a properties file with keys and
> values)
> > with
> > characters in any language. Once I loaded them into a properties object I
> > display
> > them as menu items under a menu. Anyway, since that text file is generic
> in any
> >
> > language, I'm just wondering if the characters in the file should be in
> unicode,
> > OR
> > can it just be written in the character of that language(e.g. if the
> language is
> >
> > Chinese do I have to write them in unicode OR can I just write in Chinese
> > characters)?
> >
> > Thanks very much
> >
> > K W
> >
Technical Details
Message-ID:
<380DFDEE.2BABE215@mks.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7uhr5l$ha99@forums.borland.com> <7uj2bf$s244@forums.borland.com> <7uj89q$s229@forums.borland.com> <380DC841.FE608D5@mks.com> <7ukq0v$de13@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,68e7b9b264b14ab6 X-Google-Attributes: gid111d45,public From: Kevin Wang <kwang@mks.com> Subject: Re: Display Chinese Characters in JTextField or JTextArea etc Date: 1999/10/20 Message-ID: <380DFDEE.2BABE215@mks.com> X-Deja-AN: 538497382 Content-Transfer-Encoding: 7bit References: <7uhr5l$ha99@forums.borland.com> <7uj2bf$s244@forums.borland.com> <7uj89q$s229@forums.borland.com> <380DC841.FE608D5@mks.com> <7ukq0v$de13@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Mortice Kern Systems Inc. Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing