Support for GB18030 locale is missing

Bug #230532 reported by boson84
6
Affects Status Importance Assigned to Milestone
libx11 (Ubuntu)
Fix Released
Medium
Bryce Harrington
Hardy
Won't Fix
Undecided
Unassigned
Intrepid
Fix Released
Medium
Bryce Harrington

Bug Description

Binary package hint: libx11-dev

Bug exists on Ubuntu Release: 7.10 and 8.04

This bug report is in reference to the question that I had raised in Ubuntu forum: http://ubuntuforums.org/showthread.php?t=751619.

By default, Ubuntu does not install gb18030 locale. However, you can easily set this up by executing following steps:

1. Modify /var/lib/locales/supported.d/zh to include zh_CN.GB18030
2. Run ' Sudo dpkg-reconfigure locales' to configure new locale.

After performing above steps, you can now see the GB18030 locale when you run the "locale -a" command, but the locale does not work with applications that are built with X11. After looking at the X11 source code from Xorg and contacting few people from Xorg community, I found that the GB18030 locale is not supported in X11. This is because one of the Xorg patches for this problem (https://bugs.freedesktop.org/show_bug.cgi?id=1573) has not been pushed into the Xorg code base. We've used this patch by getting the x11 source code and the patch seems to work well with GB18030 locale and it resolves this issue. Can Ubuntu community do anything about including this patch? There seems to few distributions such as SUSE, redhat that have included this patch on their platform.

Steps for reproducing the problem:
1. Log in to the desktop using Chinese locale (preferably gb18030 locale).
2. Open a terminal.
3. execute "locale" command verify that the locale is set to zh_CN.gb18030
4. If the locale is not set to zh_CN.gb18030, then execute following command to change the locale: "export LANG=zh_CN.gb18030".
5. Type some Chinese letters in the terminal (by first triggering the Chinese input method using CTRL + SPACE).) Notice that the Chinese characters are not rendered under this locale.

The GB18030 locale is very important for Chinese locale. As to my knowledge, all softwares sold in China by law requires that they support this locale.

Revision history for this message
oldy54 (greg-birnie) wrote :

It would be very useful if this were fixed in Ubuntu. We need to apply this patch to make our control systems comply with Chinese specs.

Revision history for this message
Bryce Harrington (bryce) wrote :
Changed in libx11:
importance: Undecided → Medium
milestone: none → intrepid-alpha-3
status: New → Triaged
unggnu (unggnu)
Changed in libx11:
assignee: nobody → bryceharrington
Bryce Harrington (bryce)
Changed in libx11:
status: New → Incomplete
Revision history for this message
Bryce Harrington (bryce) wrote :

It looks like the fix has been incorporated upstream, and the version we have in Intrepid includes the fix.
Please verify against Intrepid, and if it works properly let us know so we can SRU it back to Hardy.

Changed in libx11:
status: Triaged → Fix Released
Revision history for this message
boson84 (ashish-kapadia) wrote :

I had incorrectly assumed that the problem that you see on Console is same as the problem that we were experiencing in our application. The patch by Bryce fixes the problem in Ubuntu 8.10 Intrepid release that occurs as a result of following the steps that I had originally described. However it does not fix the core issue that I had originally mentioned. The Bryce’s fix is in the libxft library where as the fix for the problem that we are experiencing should be in libX11 library.

The problem is that the libX11 library does not support the GB18030 locale. As a result any application that only uses libX11 library to render font on the X Server under GB18030 locale does not work. The only way to resolve this issue is to apply the patch associated with this bug https://bugs.freedesktop.org/show_bug.cgi?id=1573. It appears that the patch is now part of the xorg starting November 22, 2008. When I had originally reported the problem, the patch was not included in the xorg.

I’m now including steps on how to reproduce this issue base on the Xlib based application:

1. Install the gb18030 locale as described in the ticket description above.
2. Login to the ubuntu system using administrator privileges
a. Go to System -> Administrator -> Language Support option. Select the Chinese language and check the “Enable support to enter complex characters” option.
b. Reboot the system.
c. Above steps should install the arphic Chinese fonts on your system.
3. Login to your ubuntu system using gb18030 locale. Type "locale" command on your console to verify that you are using gb18030 locale.
4. Next, download the attached test_xim.c file. The file assumes that your system has arphic Chinese fonts for gb18030 locale. These should be installed using the step #2. If you already some other Chinese fonts then you can modify the DEFAULT_FONT_NAME line the code with the appropriate font names.
5. Compile the file as: gcc test_xim.c –lX11
6. Run the ./a.out executable.
7. Type some text on the white window that is popped up, you should see the text in black color. Next try typing some Chinese character using Chinese input method. You can trigger the Chinese input method using Ctrl + Space key.
8. Notice that the Chinese characters are not being rendered.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in libx11 (Ubuntu Hardy):
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.