It seems to me that we need a documentation on CJK (Chinese, Japanese and Korean). So, 
I created a draft as below. The draft has no introduction, because I see it as a FAQ 
or a short document. The topic covers both users and developers, CJK and non-CJK 
people. Please read it, test it if you can, and send me feedbacks.

See also:
http://www.debian.org/doc/manuals/intro-i18n/index.en.html

==CJK on MacOSX==
===Locale on Darwin and X===
To use CJK support with X, there are two levels to use the correct locale settings: OS 
locale and X_LOCALE. X_LOCALE has been a workaround for OS without locale support. In 
the case of GTK and Qt applications, these libraries (gtk+ and qt3) should match at 
which level X use the locale settings, or your input method is unlikely to work and 
some texts may not be displayed correctly.

Up to 10.2, MacOSX does not support locale at Darwin level (libc), hence your option 
is limited to X_LOCALE. This was probably because Cocoa/Carbon uses 
internationalization features in Core Foundation. MacOSX 10.3 now supports locale at 
Darwin level, and this is the preferred way to enable CJK support on X. Apple X11 
shipped with any version of MacOSX (up to X11 1.0) is X_LOCALE enabled. There are 
Fink's packages (<filename>libkpg4</filename> for up to 10.2 and 
<filename>fix-apple-x11</filename> for 10.3) which fix this problem in Apple X11.

One of the disadvantages of X_LOCALE was you cannot use multiple encodings because 
packages are compiled for a specific encoding.

===Fink Packages===
For Developers:
Since X11 for MacOSX 10.2 have X_LOCALE, All the X packages (such as 
<code>gtk+</code>) for 10.2 should consider using X_LOCALE while those for 10.3 should 
have X_LOCALE disabled.

Qt:
If you use Qt/KDE applications, after you install qt3, run 
<filename>qtconfig</filename> and change the IM to "Over The Spot" to use kinput2 
properly.

==MacOSX10.2 and X11 Beta==
===Environmental Variables===
Set these environmental variables in <filename>~/.MacOSX/environment.plist</filename> 
because Apple X11 ignores the variables set in ~/.xinitrc. If the file does not exist, 
create one by hand. When you double click the file, Property List Editor opens it

In Property List Editor, click "New Root". Click the triangle next to Root and creates 
New Child. Change New Item to LC_TIME, and value to "C". There are three samples below 
to use EUC.

#Chinese:
LC_TIME=C
LC_COLLATE=C
LANG=zh_CN.EUC
XMODIFIERS="@im=kinput2"

#Japanese:
LC_TIME=C
LC_COLLATE=C
LANG=ja_JP.EUC
XMODIFIERS="@im=kinput2"

#Korean:
LC_TIME=C
LC_COLLATE=C
LANG=ko_KR.eucKR (ko_KR.EUC does not work with Korean IM <filename>ami</filename>)
XMODIFIERS="@im=kinput2"

===Fink Packages===
All the packages for MacOSX10.3 should have X_LOCALE enabled. Apple's X11 has X_LOCALE 
enabled, but with UTF-8 related bugs, so fix it as:
<code>fink install libxpg4</code>

If you want to use GTK applications with Apple X11, add these configure parameters to 
ConfigureParams in the info file 
(<filename>/sw/fink/10.3/stable/main/finkinfo/gnome/gtk+-1.2.10-13.info</filename>)(The
 sample shows for Japanese support).

<code>--with-locale=ja_JP.EUC</code>

Because of bugs in autoconf, it is necessary to specify this option even if your LANG 
environment variable is correctly set.

Packagers:
It may be wise to have variants such as gtk+-zh, gtk+-ja and gtk+-ko?

===Chinese and Korean===
For Chinese Input Method, xcin is one of the best choice. For Korean Input Method, ami 
is the only choice. They are not packaged for Fink yet. Let's hope they will be 
packaged soon.

See also:
http://xcin.linux.org.tw/
http://packages.debian.org/stable/source/ami

===Japanese===
For Japanese Input Method, kinput2 and canna is one of the best combinations for 10.2.

<code>fink install kinput2 canna</code>

Add the line to ~/.xinitrc
<code>/sw/bin/cannaserver &
/sw/bin/kinput2 -canna &</code>

Add the line to ~/.bashrc
<code>export XMODIFIERS="@im=kinput2"</code>

==MacOSX 10.3 and X11 1.0==
===Environmental Variables===
Set these environmental variables in <filename>~/.bash_rc</filename>.

#Chinese:
LANG=zh_CN.EUC
XMODIFIERS="@im=kinput2"

#Japanese:
LANG=ja_JP.eucJP
XMODIFIERS="@im=kinput2"

#Korean:
LANG=ko_KR.eucKR (ko_KR.EUC does not work with Korean IM <filename>ami</filename>)
XMODIFIERS="@im=kinput2"

===Fink Packages===
All the packages for MacOSX10.3 should have X_LOCALE disabled. Apple's X11 has 
X_LOCALE enabled, so fix it as:

<code>fink install fix-apple-x11</code>

If you use Fink version of X (XFree86 or X.org), you are free from these problems.

===Chinese and Korean===
For Chinese Input Method, xcin is one of the best choice. For Korean Input Method, ami 
is one of the only choice. They are not packaged for Fink yet. Let's hope they will be 
packaged soon.

See also:
http://xcin.linux.org.tw/
http://packages.debian.org/stable/source/ami

===Japanese===
For Japanese Input Method, kinput2 and macim is one of the best combinations for 10.3.

<code>fink install kinput2.macim fix-apple-x11</code>

Add the line to ~/.xinitrc
<code>/sw/bin/kinput2.macim &</code>

Add the line to ~/.bashrc
<code>export XMODIFIERS="@im=kinput2.macim"</code>


--
BABA Yoshihiko
Kyoto Center for Community Collaboration
Fink Support, Translation and Documentation Team


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to