[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [I18n]xterm and XIM



>From: Tomohiro KUBOTA <tkubota@xxxxxxxxxxx>
> #if OPT_USE_UTF8_API
>    use Xutf8LookupString()
> #elif __STDC_ISO_10646__
>    use XwcLookupString()
>    convert UCS-4 -> UTF-8
> #else
>    use iconv()
> #endif

Relying on the __STDC_ISO_10646__ is even worse than Xutf8LookupString
because of its compilation binding. It is not wise to create separate
binaries just for wc encodings which has been an opaque and being
bound runtime for long POSIX/C history, so we should avoid relying on
__STDC_ISO_10646__. 
Although I am in favor of introducing Unicode support in Xlib for the
application use, but not in the form of introducing functions.
Introducing new functions just for different encodings is not a wise
way to address the problem because it also results separate binaries
to resolve symbols with linkage editor. Instead, mb/wc encodings
should be something settable/gettable via existing set/get operations.

Why don't we just use iconv for the time being until such Unicode
support API is official?

> Many XIM servers (well, all XIM servers as far as I have used) work
> only in locales with local encodings such as ja_JP.eucJP and zh_TW.Big5.

Not accurate.
Some XIM servers may only run on the specific locales, but such
restrictions do not affect to the X clients because they are
communicating over the wire via XIM protocol.

Running XIM server in ja_JP.eucJP locale and connecting to it from the
X client running in ja_JP.UTF-8 locale or in ja_JP.sjis locale is
perfectly normal usage of XIM, and supported by XIM protocol design.

What I was talking about is only for UTF-8 xterm, not for XIM server.

> setlocale to UTF-8 will disable to use these XIM servers (such as
> kinput2, skkinput, ami, and xcin).

Are you sure? if so, isn't it a bug?

--
hiura@{sun.com,li18nux.org,kondara.org,unicode.org} http://www.li18nux.org
Chair, Li18nux/Linux Internationalization Initiative, Free Standards Group
Architect/Sr. Staff Engineer, Sun Microsystems, Inc, USA  FAX 650-786-9553
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/