Follow Up Post - Input Methods Win2K

Just a quick note - I discovered that Windows 2000 (English version) does support input methods in Chinese AND it works with Swing. :)

There was some talk of using third-party software like njstar, but I guess it seems to be only needed in NON-Windows 2000 environments.

To activate Chinese Input methods on a pure English Windows 2000 -

Go to Regional Settings - Input Locales

Add: Input Language: Chinese (PRC)

with Keyboard/layout: Simplified@Chinese - ZhengMa

Now, your ready to type Chinese in Swing Windows too ...

I have'nt discovered 2 things yet -

- Why should the keyboard/layout be set to:

Chinese (PRC) - Simplified Chinese Zhengma?

Why does'nt

Chinese (PRC) - Chinese (Simplified) US Keyboard work?

Because the fact is I am using a US keyboard.

-- What the encoding of the text generated by Windows 2000 is and how do I read it?

When I go to IME Setting for: Chinese (PRC) - Simplified Chinese Zhengma it pops a Chinese window with GB2312 and GBK ... are these encoding methods? I thought Win2000 used only Unicode?

Any advice will be appreciated. Thanks Martin for some of your previous posts - they were helpful.

TIA,

Carlos

[1266 byte] By [carlosnf] at [2007-9-26 3:44:30]
# 1

Hi Carlos,

Correct, NJStar is extremely useful if you aren't in Windows 2000.

I'm pretty sure Win2K's support of Unicode is bog standard at best. It certainly isn't up to Java's standard where everything being stored internally is in Unicode. As far as I'm aware that statement of MS's only covers flat files and databases at this point in time, and will take another two OS releases before it occurs across the board as it does in Java. But don't quote me on that! :)

GB2312 is a Chinese encoding. Java will be able to read in this form of encoding, and then convert it to Unicode once it's being stored internally. Hope that doesn't sound too confusing! The important point here is that GB and Unicode are two entirely separate encodings. You may need to convert between the two in places, especially if you're dealing with HTML and/or JSP.

As for the keyboard, no idea. I can only assume that:

1) The US version is laid out differently

2) There's a bug in the JDK for this keyboard layout

3) It refers to a keyboard that lets Chinese people type in English characters (though I'd doubt it!)

Hope that helps!

Martin Hughes

martinhughes at 2007-6-29 12:24:16 > top of Java-index,Desktop,I18N...