Comment 50 for bug 34282

Revision history for this message
Ming Hua (minghua) wrote : [Bug 34282] Re: [Feisty Edgy Dapper] language-support-"any CJK language" doesn't set up a way to input this language with scim if the session doesn't correspond to this particular CJK (Chinese, Japanese or Korean) language

On Mon, Apr 23, 2007 at 11:43:38PM -0000, Emmet Hikory wrote:
> I see three ways to address this:
>
> 1) im-switch is add the current (or requested) locale to
> /SupportedUnicodeLocales

This is a very fragile solution. The file /etc/scim/global which
contains the "/SupportedUnicodeLocales" configuration is a conffile of
package scim. In principle im-switch shouldn't touch other package's
conffile.

Also locales can be generated by user actions, whether installing
language support packages, or explictily run "dpkg-reconfigure locales"
(or something similar in Ubuntu). The only "current" situation
im-switch can know is when it is installed, which can be very different
from the situation when scim is run.

> 2) /etc/scim/global to include all locales by default (my least favorite)

I don't like it either. There are just too many UTF-8 locales. And
keeping a duplicate list which may get updated from time to time is
never a good idea.

> 3) scim itself to ignore /SupportedUnicodeLocales always attempt to
> support the current locale

Some non-UTF-8 locales just can't be supported, such as en_US
(ISO-8859-1 encoding). Even if we only consider UTF-8 locales, this
still needs knowledge about both the scim code and locale handling.
This is close to what I have in mind when I say "patches are always
welcome", changing the way scim handles locales.

> I'm not very familiar with the architecture of im-switch and scim,
> and so am unsure of the ancillary effects that might develop as a result
> of any of these choices. From my quick review, I would suspect that the
> first is the least intrusive (although not necessarily correct), and
> would involve parsing (or creating) ~/.scim/global to include the
> appropriate locale.

If you want to modify ~/.scim/global instead of /etc/scim/global, you
have the problem of only being able to change setting on a user-by-user
basis, but not system-wide.

Also, if scim is already running, it will ignore changes to
~/.scim/global and rewrite its internal settings back when it exits.
That's another issue that needs consideration.

Ming
2007.04.26