Bug 15719 - SCIM and other XIM servers never loaded on Thai locale
Summary: SCIM and other XIM servers never loaded on Thai locale
Status: CLOSED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: * Other (show other bugs)
Version: 7.3 (2007.09)
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: i18n, patch
Depends on:
Blocks:
 
Reported: 2008-04-26 02:53 UTC by Theppitak Karoonboonyanan
Modified: 2011-10-15 16:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch adding checks for IM names (809 bytes, patch)
2008-04-26 03:12 UTC, Theppitak Karoonboonyanan
no flags Details | Splinter Review

Description Theppitak Karoonboonyanan 2008-04-26 02:53:08 UTC
As reported to me by Pat Suwalski from Xandros, SCIM never works on th_TH (Thai) locale for plain X apps. Only toolkit apps with direct SCIM bridge can use SCIM properly. However, on other locales, SCIM just works fine.

Steps to reproduce:

 $ scim -d
 $ LC_ALL=th_TH.UTF-8 XMODIFIERS=@im=SCIM xterm
Comment 1 Theppitak Karoonboonyanan 2008-04-26 03:04:48 UTC
This is because _XOpenIM() implementation [modules/im/ximcp/imInt.c] checks the _XimImSportRec[] array [modules/im/ximcp/imImSw.c] for processing in this order:

 - _XimCheckIfLocalProcessing() [modules/im/ximcp/imLcIm.c]
 - _XimCheckIfThaiProcessing() [modules/im/ximcp/imThaiIm.c]
 - _XimCheckIfDefault() [modules/im/ximcp/imImSw.c]

_XimCheckIfLocalProcessing() checks for "local" or "none" IM, or Compose IM.

_XimCheckIfThaiProcessing() checks if the language of the current locale is Thai. If so, _XimThaiOpenIM() is called to open the built-in Thai XIM immediately, regardless of how XMODIFIERS is set to choose other XIM server (in this case, SCIM).

Therefore, on Thai locale, no other external XIM server is allowed.
Comment 2 Theppitak Karoonboonyanan 2008-04-26 03:12:30 UTC
Created attachment 16190 [details] [review]
Patch adding checks for IM names

This patch adds more checks for Thai XIM processing. To open the internal Thai XIM, not only the locale must be matched, but the IM name must also be one of the predefined values, or null.
Comment 3 Theppitak Karoonboonyanan 2008-04-26 03:14:31 UTC
Added i18n and patch keywords.
Comment 4 Daniel Stone 2008-04-27 23:04:22 UTC
On Sat, Apr 26, 2008 at 03:12:31AM -0700, bugzilla-daemon@freedesktop.org wrote:
> Created an attachment (id=16190)
>  --> (http://bugs.freedesktop.org/attachment.cgi?id=16190)
> Patch adding checks for IM names
> 
> This patch adds more checks for Thai XIM processing. To open the internal Thai
> XIM, not only the locale must be matched, but the IM name must also be one of
> the predefined values, or null.

Thanks.  Do those names need to be checked with strcasecmp, or is it
case-sensitive?
Comment 5 Theppitak Karoonboonyanan 2008-04-28 00:16:18 UTC
(In reply to comment #4)

> Thanks.  Do those names need to be checked with strcasecmp, or is it
> case-sensitive?

In InitIscMode() [imThaiFlt.c], it's compared with strncmp(). So, if it's to be case insensitive, that function would also need the corresponding change.
Comment 6 Daniel Stone 2008-04-28 02:03:31 UTC
On Mon, Apr 28, 2008 at 12:16:19AM -0700, bugzilla-daemon@freedesktop.org wrote:
> (In reply to comment #4)
> > Thanks.  Do those names need to be checked with strcasecmp, or is it
> > case-sensitive?
> 
> In InitIscMode() [imThaiFlt.c], it's compared with strncmp(). So, if it's to be
> case insensitive, that function would also need the corresponding change.

Okay, pushed as 0b6682303e9c61fefc3818acfda616b1e3691abf, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.