CharSet-to-CompoundText Conversion Failed for Thai Locales

SCIM fails to commit Thai input characters on Thai locales, because it commits
string in compound text form, which was converted via
XwcTextListToTextProperty(). But the XLC_LOCALE for th_TH and th_TH.UTF-8
declares cs1's ct_encoding as TIS620-0:GR, which was commented out in
src/xlibi18n/lcCT.c default_ct_data, in favor of ISO8859-11 ESC sequence.
So, declaring cs1 as ISO8859-11:GR instead makes it work.

Besides, for th_TH.UTF-8, adding cs2 class with ISO10646-1 encoding also adds
support for UTF-8 input.

And, along discussion in the bug, a similar problem was found for fontset, too,
by causing delays on X apps startups on systems without tis620-0 fonts. This
is normally the case, as mkfontdir and mkfontscale generate iso8859-11 entries
by default for Thai X fonts. So, Thai fontset charset is also patched.

X.Org Bug 16475 <http://bugs.freedesktop.org/show_bug.cgi?id=16475>

Signed-off-by: Theppitak Karoonboonyanan <thep@linux.thai.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Theppitak Karoonboonyanan 2009-04-09 11:25:25 +07:00 committed by Julien Cristau
parent fd62d3318c
commit d108d3c706
2 changed files with 12 additions and 6 deletions

View file

@ -27,8 +27,8 @@ fs1 {
}
XCOMM fs1 class (Thai)
fs2 {
charset TIS620-0:GR
font TIS620-0:GR
charset ISO8859-11:GR
font ISO8859-11:GR
}
END XLC_FONTSET
@ -69,7 +69,13 @@ cs1 {
length 1
wc_encoding \x30000000
ct_encoding TIS620-0:GR
ct_encoding ISO8859-11:GR
}
XCOMM cs2 class
cs2 {
side none
ct_encoding ISO10646-1
}
END XLC_XLOCALE

View file

@ -16,8 +16,8 @@ fs0 {
}
XCOMM fs1 class (Thai)
fs1 {
charset TIS620-0:GR
font TIS620-0:GR
charset ISO8859-11:GR
font ISO8859-11:GR
}
END XLC_FONTSET
@ -61,7 +61,7 @@ cs1 {
#else
wc_encoding \x00008080
#endif
ct_encoding TIS620-0:GR
ct_encoding ISO8859-11:GR
}
END XLC_XLOCALE