Thai language input not work correctly

Bug #273856 reported by DArKer on 2008-09-24
26
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Medium
gtk+2.0 (Ubuntu)
Low
Ubuntu Desktop Bugs
Intrepid
Low
Ubuntu Desktop Bugs

Bug Description

Thai language input not work correctly in all application after I upgrade from 8.04.1 to Intrepid.
The Thai upper and lower vowel can not type but normal character is OK.

DArKer (dak0808) wrote :

fix by uninstall scim

sugree (sugree) wrote :

scim seems to be the default input method. Uninstalling scim is just a workaround for this problem. The real solution is to correct something wrong in scim.

Arne Goetje (arnegoetje) wrote :

Could you please give me a test case? What do I need to type to reproduce this bug?
What output is expected and what is given?
Has it worked with SCIM in Hardy?
What keyboard layout do you use? Standard US or anything else?

DArKer (dak0808) wrote :

in Thai layout
Ex. สวสดครบ ผมพมพภาษาไทยไมไดครบ

DArKer wrote:
> in Thai layout
> Ex. สวสดครบ ผมพมพภาษาไทยไมไดครบ
>

how to type this (keystrokes, please)? I'm not familiar with Thai
language or script.

DArKer (dak0808) wrote :

I types "สวัสดีครับ ผมพิมพ์ภาษาไทยไม่ได้ครับ".
It's appear "สวสดครบ ผมพมพภาษาไทยไมไดครบ.
And sometimes after I types upper and lower vowel I can not type normal characters.
Ex. สว [after this can not type]

Arne Goetje (arnegoetje) wrote :

DArKer wrote:
> I types "สวัสดีครับ ผมพิมพ์ภาษาไทยไม่ได้ครับ".
> It's appear "สวสดครบ ผมพมพภาษาไทยไมไดครบ.
> And sometimes after I types upper and lower vowel I can not type normal characters.
> Ex. สว [after this can not type]
>

which keys on the keyboard do you press? I don't know where these
characters are located on the keyboard.

if you type the same sequence on a US keyboard, without Thai IME
enabled, what would that look like? I need to know which physical keys
on the keyboard (qwertyuiop ...) you press and in which order to produce
the desired string.

sugree (sugree) wrote :

สวัสดีครับ ผมพิมพ์ภาษาไทยไม่ได้ครับ = l;ylfu8iy[ z,rb,rn4kKkwmpw,jwfh8iy[

Yes, it works in hardy.

Arne Goetje (arnegoetje) wrote :

sugree wrote:
> สวัสดีครับ ผมพิมพ์ภาษาไทยไม่ได้ครับ = l;ylfu8iy[
> z,rb,rn4kKkwmpw,jwfh8iy[
>
> Yes, it works in hardy.
>

Thanks, I'm taking a look at it right now.

SiraNokyoongtong (gumara) wrote :

Problem is default input method. Just right click in text area select menu
Input Methods > thai-lao.

Mara

เมื่อ กันยายน 26, 2008 9:04 ก่อนเที่ยง, sugree <email address hidden> เขียนว่า:

> สวัสดีครับ ผมพิมพ์ภาษาไทยไม่ได้ครับ = l;ylfu8iy[
> z,rb,rn4kKkwmpw,jwfh8iy[
>
> Yes, it works in hardy.
>
> --
> Thai language input not work correctly
> https://bugs.launchpad.net/bugs/273856
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Arne Goetje (arnegoetje) wrote :

SiraNokyoongtong wrote:
> Problem is default input method. Just right click in text area select menu
> Input Methods > thai-lao.

No, this is not the right solution! Your proposal only works in Gnome
applications. Scim-Thai should work in almost any application. If the
bug is in scim-thai, it needs to be fixed there.

Arne Goetje (arnegoetje) wrote :

OK, guys: I made the test on my Intrepid Alpha 6 in en_US locale by typing the posted sequence with different input methods in gedit. I used "scim-thai", XKB layout "Thai-Thailand" and XKB layout "Thai-TIS820.2538" both with "libthai" and "ThaiLao" input methods.

Screenshot is attached. Now, this looks all the same to me, please tell me where the output is error-nous.

BTW: scim-thai is *not* installed by default and also not pulled in by any language-support package for the Thai language.

So, it seems that you have a different installation than me. Can you please tell me what you did to install your system and in which language, so that I can hopefully reproduce this bug here.

Also, did you only upgrade from Hardy, or try to install Intrepid from scratch?

Thanks for your help.

sugree (sugree) wrote :

According to the screenshot, it looks good. In hardy we don't have to install scim-thai but scim works. However, Intrepid installed from scratch without scim-thai doesn't work as usual.

SiraNokyoongtong (gumara) wrote :

I've tried in intrepid alpha4

1. boot intrepid alpha4 with thailanguage selected (Live CD)
2. install scim-thai
3. restart Xwindow

Then I type by system input method problem is the same.

Mara

2008/9/26 sugree <email address hidden>

> According to the screenshot, it looks good. In hardy we don't have to
> install scim-thai but scim works. However, Intrepid installed from
> scratch without scim-thai doesn't work as usual.
>
> --
> Thai language input not work correctly
> https://bugs.launchpad.net/bugs/273856
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Isriya Paireepairit (markpeak) wrote :

My step to reproduce:

1. Install fresh Intrepid Alpha 6
2. At installation screen, select Thai Keyboard > Thai
3. After first boot without doing anything else, launch gedit and then switch keyboard layout (using Alt+Shift key combination) and type any Thai text (can use the text provided by DArKer/Sugree)

My workaround

1. Go to Preference > Language Support
2. Choose "Thai" in "Supported Language"
3. Don't choose "Enable support to enter complex characters"
4. Logout and then login again
5. Thai input now works fine

I'm not sure which one is the default input method for Intrepid. From my step, I think it's XIM rather than SCIM, right?

My guess, selecting "Thai Keyboard" in the installation step doesn't install necessary component for Thai input. Is this dependency problem?

I'd stop test intrepid for couple weeks ago due to my job.

This link I reported

https://bugs.launchpad.net/ubuntu/+bug/273856/

Arne Goetje (arnegoetje) wrote :

OK, thanks everyone for their input, I will try to find out where the problem is and fix it.

But I can say, that the problem is not SCIM. It may be a dependency problem on the Live CD, I will keep you posted.

Just as a remark: SCIM, without scim-thai or scim-m17n installed doesn't provide any way to type Thai. So, my guess is there is some confusion going on about which input method is the default one.

Just out of curiosity: which input method is preferred by Thai users? XKB+libthai? Or would it be better to have scim-thai as default IME?

Sorry for wrong link.
This is correct one.
https://bugs.launchpad.net/ubuntu/+bug/252461

AnuchitChalothorn (anuchit) wrote :

I was check some package in Intrepid Alpha 4 Live CD and Hardy Live CD. like this...

==== Intrepid Alpha 4 Live CD =====
root@akenaten-desktop:/etc/alternatives# apt-cache search thai
libtext-wrapi18n-perl - internationalized substitute of Text::Wrap
ttf-thai-tlwg - Thai fonts in TrueType format
libthai0 - Thai language support library
libthai-data - Data files for Thai language support library
firefox-3.0 - safe and easy web browser from Mozilla

==== Hardy Live CD ====
root@ubuntu:/etc/X11/xinit/xinput.d# apt-cache search thai
firefox-3.0 - safe and easy web browser from Mozilla
gtk-im-libthai - GTK+ Input Method Module using LibThai
kde-i18n-th - Thai internationalized (i18n) files for KDE
language-pack-gnome-th - GNOME translation updates for language Thai
language-pack-gnome-th-base - GNOME translations for language Thai
language-pack-kde-th - KDE translation updates for language Thai
language-pack-kde-th-base - KDE translations for language Thai
language-pack-th - translation updates for language Thai
language-pack-th-base - translations for language Thai
language-support-fonts-th - Additional fonts metapackage for Thai
language-support-input-th - Input methods metapackage for Thai
language-support-th - metapackage for Thai language support
language-support-translations-th - Additional translations metapackage for Thai
language-support-writing-th - Writing aids metapackage for Thai
libdatrie-bin - Programs for double-array trie library
libdatrie0 - Double-array trie library
libdatrie0-dev - Development files for double-array trie library
libdatrie0-doc - Documentation files for double-array trie library
libtext-wrapi18n-perl - internationalized substitute of Text::Wrap
libtextwrap-dev - text-wrapping library with i18n - development files
libtextwrap1 - text-wrapping library with i18n - runtime
libthai-data - Data files for Thai language support library
libthai-dev - Development files for Thai language support library
libthai-doc - Documentation files for Thai language support library
libthai0 - Thai language support library

I found something. In Hardy version has package look like input method is gtk-im-libthai and It is not include in Alpha 4 Live CD. I don't know this is exactly problem, may be someone should recheck.

Felix Hanley (felixhanley) wrote :

I also have the same issue, Alpha 6 installed.
SCIM not installed (never used it before)

Interestingly, the correct Thai characters (above and below the lines) show correctly when I type in urxvt and vim (console) but not in any GUI, particularly not Firefox, OpenOffice or gvim (GUI version of vim).

I use Awesome for my window manager and have installed as little as possible. Still it used to work prior to Intrepid.

my /etc/default/console-setup has the following:

XKBMODEL="evdev"
XKBLAYOUT="us,th,lhu"
XKBVARIANT=",tis"
XKBOPTIONS="grp:menu_toggle,lv3:ralt_switch,grp_led:scroll"

('lhu' is my own keyboard creation but it doesn't work either way, included or not)

Arne,

The problem with SCIM is that it only works on non-Thai locales. You may try it again under th_TH.UTF-8 locale to see the problem people reported here.

In fact, I have proposed a patch against libx11 in Freedesktop #16475 [1] to fix this. Just waiting for it to be checked-in. Unfortunately, it doesn't seem to happen before Intrepid release.
  [1] https://bugs.freedesktop.org/show_bug.cgi?id=16475

Thai XIM also has some pending bugs with UTF-8 locale: it rejects all combining characters, as my previous work in Xlib assumed too much about the multi-byte strings. (Only TIS-620 locale was available at that time.) And another patch has been proposed in Freedesktop #12759 [2] for this.
  [2] https://bugs.freedesktop.org/show_bug.cgi?id=12759

And finally, a minor bug in Thai XIM: it stops filtering input sequences when NumLock/CapsLock is on, as reported, with proposed patch, in Freedesktop #12517 [3].
  [3] https://bugs.freedesktop.org/show_bug.cgi?id=12517

All the three patches are against libx11. So, you can safely assign this bug to it, IMO.

All the patches are tested in my custom debs. [4] And I would appreciate if they get into Intrepid in time, and if Ubuntu help polish and push them upstream.
  [4] ftp://ftp.debianclub.org/debclub/pool/main/libx/libx11/libx11_1.1.5-2thep1.dsc

Assigned to libx11.

Arne Goetje (arnegoetje) on 2008-09-29
Changed in libx11:
assignee: nobody → arnegoetje
status: Confirmed → In Progress
Arne Goetje (arnegoetje) wrote :
Changed in libx11:
status: In Progress → Fix Committed
Steve Langasek (vorlon) wrote :

bugfix, doesn't require ubuntu-release approval, just sponsorship.

Martin Pitt (pitti) wrote :

Uploaded, waiting in unapproved now.

Note: Please next time test and build the patch against the intrepid version, not the unstable version.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libx11 - 2:1.1.5-1ubuntu1

---------------
libx11 (2:1.1.5-1ubuntu1) intrepid; urgency=low

  [ Theppitak Karoonboonyanan ]
  * New patches (LP: #273856) :
    + 020_th_TH_iso8859-11_ct.diff: Fix Thai charset-to-compoundtext
      conversion under th_TH locales. (Freedesktop #16475)
    + 021_Thai_xim_num_caps.diff: Fix Thai XIM key filter when
      CapsLock/NumLock is on. (Freedesktop #12517)
    + 022_Thai_xim_surr_conv.diff: Convert text returned from
      StringConversionCallback properly. (Freedesktop #12759)

 -- Arne Goetje <email address hidden> Mon, 29 Sep 2008 09:49:01 +0800

Changed in libx11:
status: Fix Committed → Fix Released

After update today

Sat 04 Oct 2008 09:33:14 AM ICT

พพทยไดรย
rb,rNwmpwfhsinvpy'

Did I do anything wrong?
And Is this relate to it?

root@ibex-a-6:/home/isra#aptitude install language-support-extra-th
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages are BROKEN:
  language-support-extra-th
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1808B of archives. After unpacking 32.8kB will be used.
The following packages have unmet dependencies:
  language-support-extra-th: Depends: pango-libthai which is a virtual package.
Unable to resolve dependencies! Giving up...
The following packages are BROKEN:
  language-support-extra-th
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1808B of archives. After unpacking 32.8kB will be used.
aptitude failed to find a solution to these dependencies. You can solve them yourself by hand or type 'n' to quit.
The following packages have unmet dependencies:
  language-support-extra-th: Depends: pango-libthai which is a virtual package.
Resolve these dependencies by hand? [N/+/-/_/:/?] +

pango-libthai has been obsolete for a long time, after being integrated upstream. Please file another bug against language-support-extra-th to remove the dependency.

Regarding the input, please make sure you have upgraded libx11-6 and libx11-data to at least 2:1.1.5-1ubuntu1. If you have already upgraded and the problem still exists, please also describe what application you were using, as well as the selected input method. Thanks.

OK. Thank you for information

below is my libx11-data
root@ibex-a-6:/home/isra# aptitude search libx11-data
i libx11-data - X11 client-side library
root@ibex-a-6:/home/isra# aptitude show libx11-data
Package: libx11-data
State: installed
Automatically installed: no
Version: 2:1.1.5-1ubuntu1
Priority: optional
Section: x11
Maintainer: Ubuntu Core Developers <email address hidden>
Uncompressed Size: 2167k
Replaces: libx11-6 (<= 2:1.0.0-1)
Description: X11 client-side library
 This package provides the locale data files for libx11.

 More information about X.Org can be found at: <URL:http://www.X.org>
 <URL:http://xorg.freedesktop.org>
 <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>

 This module can be found at git://anongit.freedesktop.org/git/xorg/lib/libX11

Now what can I do 2 this.
พพทยไดรย
rb,rNwmpwfhsinvpy'

but If I switch session to thai everything work fine. ???

I think it effected to system wide.

this example with OO writer

พพทยไดรย
rb,rNwmpwfhsinvpy'

พพไทย ไดหร ย
rb,rN wmp wfh sinv py'

> root@ibex-a-6:/home/isra# aptitude show libx11-data
> Package: libx11-data
> State: installed
> Automatically installed: no
> Version: 2:1.1.5-1ubuntu1

So, I suppose the same is true for libx11-6, right?

And could you try "echo $XMODIFIERS" command in a terminal?

>So, I suppose the same is true for libx11-6, right?
Package: libx11-6
State: installed
Automatically installed: no
Version: 2:1.1.5-1ubuntu1

>And could you try "echo $XMODIFIERS" command in a terminal?

It shown blank line ?? both in root and $user terminal.
isra@ibex-a-6:~$ echo $XMODIFIERS

isra@ibex-a-6:~$

> isra@ibex-a-6:~$ echo $XMODIFIERS
>
> isra@ibex-a-6:~$
> ...
> but If I switch session to thai everything work fine. ???

Ah.. So, I've been attacking a different problem than yours.
All my patches were for Thai locale, not English.

Using English locale for Thai environments needs some
cautions, as it's for English, not for Thai.

English locale doesn't set any IM option through im-switch. So,
all apps just use the default null values. For GTK+, the default
input method is "Simple", which is mainly for English and for
European accents composition. (I don't know if it's reasonable
to try to add Thai support to it, but we can try it later.)

Your available choices are scim-thai and gtk-im-libthai. You can
install either on your system, up to your preference, and then
configure im-switch to choose it.

To se what options are available for you:
  $ im-switch -l
  ...
  =======================================
  The available input method configuration files are:
  default default-xim none scim scim-bridge scim-immodule
  scim_xim th-gtk-im-libthai th-xim
  =======================================

In case you prefer gtk-im-libthai:
  $ im-switch -a th-gtk-im-libthai
Or if you prefer scim:
  $ im-switch -a scim-immodule

This needs a new login to take effect.

Note that with gtk-im-libthai, you won't benefit from any input
sequence check for non-GTK+ apps. Those apps will use XIM,
which doesn't check anything on en_US locale. Only GTK+ apps
benefit from it.

If you want to also use Thai XIM upon en_US locale, you will
need to set LC_CTYPE environment to th_TH.UTF-8.
For example, in your ~/.bashrc:
  export LC_CTYPE=th_TH.UTF-8

And finally, note that all GTK+ text entry widgets have an "Input
Method" context menu, which allows you to choose a different
input method on the fly. All described above are for setting the
default one for your session.

On Sat, Oct 4, 2008 at 4:02 PM, Theppitak Karoonboonyanan
<email address hidden> wrote:

> English locale doesn't set any IM option through im-switch. So,
> all apps just use the default null values. For GTK+, the default
> input method is "Simple", which is mainly for English and for
> European accents composition. (I don't know if it's reasonable
> to try to add Thai support to it, but we can try it later.)

This may be reasonable. The problem seems to be introduced in
GTK+ 2.14, as GTK+ 2.12 on Debian sid doesn't have this problem.
And after checking the source, I find an extra step in the key
event filtering, where European dead key sequences are always
assumed, which is not the case for Thai. I'll try to verify if it's the
real culprit.

Regards,
--
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/

On Sat, Oct 4, 2008 at 5:23 PM, Theppitak Karoonboonyanan
<email address hidden> wrote:

> This may be reasonable. The problem seems to be introduced in
> GTK+ 2.14, as GTK+ 2.12 on Debian sid doesn't have this problem.
> And after checking the source, I find an extra step in the key
> event filtering, where European dead key sequences are always
> assumed, which is not the case for Thai. I'll try to verify if it's the
> real culprit.

And it is. GtkIMContextSimple in GTK+ 2.14 has rearranged its compose
table based on Unicode normalization, and with this, inserted a new
step to check composition "algorithmically". And this extra step assumes
all Unicode non-spacing marks as dead keys, including Thai combining
characters. And it tries to reorder the marks with the base character,
something common in European input method. But this creates invalid
Thai strings, which are thus rejected.

I've come up with a patch against GTK+ to redefine the dead keys,
so that only non-spacing marks for relevant scripts are counted.
This allows Thai text input (in a very primitive way) on English locale
again.

--
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/

Reopen the bug, as it's not over yet. And reassign it to gtk+2.0.

Changed in libx11:
status: Fix Released → Confirmed

For those of you who are interested in testing the patch, I've created the patched debs here:
  http://linux.thai.net/~thep/ubuntu/source/gtk+2.0/

very Appreciated, and Thank you. :)

I will give it a try to day.

Isra

Changed in gtk+2.0:
importance: Undecided → Low
Changed in gtk:
status: Unknown → New
Changed in gtk:
status: New → Confirmed
Changed in gtk:
status: Confirmed → Fix Released
Sebastien Bacher (seb128) wrote :

the bug has been fixed upstream and new tarballs will be rolled for GNOME 2.24.1, unsubscribing the sponsors

Changed in gtk+2.0:
assignee: arnegoetje → desktop-bugs
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+2.0 - 2.14.4-0ubuntu1

---------------
gtk+2.0 (2.14.4-0ubuntu1) intrepid; urgency=low

  * New upstream version:
    - Bugs fixed:
    553135 eog crash: assertion failed... (lp: #272754)
    553241 double freed pointer in lpr_write cause firefox3 crash
    553133 GtkFileChooser won't ask to mount a volume (lp: #272742)
    553578 tabs are not drawn correctly
    553211 GtkFileChooserButton unsets filter after first use
    554141 uninitialized data use/free in gtkclipboard-quartz.c
    554690 mem leak in filechooser
    554691 mem leak in filechooser
    554696 invalid free function used
    554698 mem leak in filechooser
    554701 filechooser spams console with useless warnings
    554704 gtkfilesystemmodel does too much work
    554506 combining diacritics broken, became deadkeys (lp: #260589)
    530575 GtkEntry with invisible chars has a confused cursor...
    371908 Password Entry broken
    132501 Make utility window translate to tool window in win32
    554702 gtkfilesystem leaks GError
    554192 double press on the "circumflex" dead key...
    550342 Splash screens have a caption
    555000 Wrong treatment on non-spacing marks dead keys... (lp: #273856)
    552318 menubar mnemonics consumed even when gtk-enable-mnemonics=false
    (lp: #268012)
    555779 GtkCellRendererPixbuf crashed on failed GIcon lookup
    555791 Nautilus Crashes when opening USB MP3 Player Contents (lp: #280924)
  * debian/patches/090_no_fileselector_warning.patch:
    - the change is in the new version
  * debian/patches/070_mandatory-relibtoolize.patch:
    - new version update

 -- Sebastien Bacher <email address hidden> Sat, 18 Oct 2008 15:07:36 +0200

Changed in gtk+2.0:
status: Fix Committed → Fix Released
Changed in gtk:
importance: Unknown → Medium

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Sira

Sira Nokyoongtong
Webmaster at Software Industry Promotion Agency (Public organization)
Thailand

Confirm that you know Sira Nokyoongtong:
https://www.linkedin.com/e/-fpy0tn-h8zvx7rs-6s/isd/9370005710/o2FA67Oa/?hs=false&tok=0Jf3NvbA4LNBs1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-fpy0tn-h8zvx7rs-6s/uyvEg5CgKwZk6DROX2AScaLg7Oz8eEBXl_9WZy7/goo/273856%40bugs%2Elaunchpad%2Enet/20061/I3133951905_1/?hs=false&tok=2Y3UEn9oULNBs1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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