[CC'd to [EMAIL PROTECTED]]

YS> This is Yu Shao, from Red Hat Asia-Pacific,

Pleased to meet you.  (Shakes hands.)

YS> at the moment, we are developing the Simplified Chinese version of
YS> Red Hat Linux, and we are having some problems with the Chinese
YS> new locale gb18030 support.

Currently, we at XFree86 have not decided whether to include native
support for GB 18030 or to promote Unicode-based locales instead and
rely on iconv and other code conversion tools to convert GB 18030
texts into UTF-8.  My personal opinion is that the latter approach is
preferable.

YS> I defined the zh_CN.gb18030 in the locale database, and also put
YS> encoding file gb18030-0.enc in, and I use FreeType module to
YS> render the chinese True Type fonts, but still no good luck. I am
YS> wondering if the encoding file gb18030-0.enc is enough for
YS> FreeType module to support this new locale, do i need to do
YS> something else?

It should be enough, as long as you include the right entries in your
fonts.scale files before generating the fonts.dir.  In released
versions of XFree86, you will also need to make sure that mkfontdir
generates an entry for your encoding in encodings.dir (this will no
longer be necessary in 4.2.0).

Please check whether xfd allows you to see the GB 18030-encoded fonts.

YS> and do I need to add coversion modules into /xc/lib/X11/lcUniConv?

These are only needed if you want UTF8_STRING to work properly in GB
18030 locales.  I wouldn't worry about it for now.

YS> I attached the patch file which is what I have done so far, can
YS> you help me to have a look?

First of all, you need a SIZE declaration in your encoding file, and
optionally a FIRSTINDEX entry.

There's probably also something missing in your XLC_LOCALE file;
unfortunately, I don't have time to work it out right now, so I'll
append it to this message and let the list work it out.

Regards,

                                        Juliusz
diff -uNr xc.orig/nls/XLC_LOCALE/zh_CN.gb18030 xc/nls/XLC_LOCALE/zh_CN.gb18030
--- xc.orig/nls/XLC_LOCALE/zh_CN.gb18030        Thu Jan  1 10:00:00 1970
+++ xc/nls/XLC_LOCALE/zh_CN.gb18030     Fri Oct 12 12:08:42 2001
@@ -0,0 +1,74 @@
+# 
+#      XLC_FONTSET category
+# 
+XLC_FONTSET
+
+on_demand_loading      True
+
+object_name            generic
+
+#      We leave the legacy encodings in for the moment, because we don't
+#      have that many ISO10646 fonts yet.
+#      fs0 class (7 bit ASCII)
+fs0    {
+       charset {
+               name    ISO8859-1:GL
+       }
+       font    {
+               primary         ISO8859-1:GL
+               vertical_rotate all
+       }
+}
+
+#   fs1 class (Chinese Han Character)
+fs1    {
+       charset {
+               name    GB2312.1980-0:GL
+       }
+       font    {
+               primary GB2312.1980-0:GL
+       }
+}
+
+#      fs2 class
+fs2    {
+       charset {
+               name    ISO10646-1
+       }
+       font    {
+               primary GB18030-0
+               substitute GBK2K-0
+       }
+}
+END XLC_FONTSET
+
+# 
+#      XLC_XLOCALE category
+# 
+XLC_XLOCALE
+
+encoding_name          GB18030
+mb_cur_max             4
+state_depend_encoding  False
+
+#      cs0 class
+cs0    {
+       side            GL:Default
+       length          1
+       ct_encoding     ISO8859-1:GL
+}
+
+#      cs1 class
+cs1     {
+        side            GR
+        length          2
+        ct_encoding     GB2312.1980-0:GL; GB2312.1980-0:GR
+}
+
+#      cs2 class
+cs2    {
+       side            none
+       ct_encoding     ISO10646-1
+}
+
+END XLC_XLOCALE


_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to