Great Circle Associates

XCIN Mail-list
(December 2000)


Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: [FWD][I18n] UTF-8 hardwired API
From: edward@linux.dreamer.org (Edward Lee)
Organization: GNU/Linux/*BSD Dreamer Club
Date: 15 Dec 2000 23:14:39 GMT
To: xcin@tlug.sinica.edu.tw
Reply-To: xcin@linux.org.tw

----- Forwarded message from Hideki.Hiura@eng.sun.com -----

From: Hideki.Hiura@eng.sun.com
Date: Thu, 14 Dec 2000 22:27:36 -0800 (PST)
To: i18n@XFree86.Org, haible@ilog.fr
Subject: [I18n] UTF-8 hardwired API

I am not (at least yet) comfortable to introduce any UTF-8 hardwired API
into X.

To support Unicode as the internal encoding for application
with current X, an application can setlocale to UTF-8 locales
by overriding what user set as the codeset part of locale name.

For example, a browser who wishes to use UTF-8 as internal
encoding, it can retrive what user set as locale via setlocale then
replace the codeset part of locale name and set back again via
setlocale instead of passing a empty string as locale.

An application can keep the codeset part of original locale set by
a user somewhere, and can perform encoding conversion whenever it
needs to. (in any case, they do anyway if their internal encoding
is set to Unicode)

For direct Unicode input support, at this moment, it may not
be as simple as output, because XIM protocol and current
vanilla libX11 implementation hit the COMPOUND_TEXT limitation.

I originally replied to Bruno that Unicode input is also OK
by blindly assuming IIIMXCF version of libX11, which is a part of
Sun's XI18N release to X.Org, which is not integrated into X.Org
tree yet.

Anyway, once IIIMXCF is integrated into main stream, Unicode
input should be fine with the strategy above.

All of those are something already doable right now.

Having said that, thinking about next step before diving into the Unicode
hard-wired API set, I think it would be better to introducing
multi-locale concept by exposing XLCd into public so that all X I18N
API would instantly becomes multi-locale capable API as it was originally
designed.

By making XLCd acessible from an application, we can set and get I/O
codeset via X{Set,Get}{IC,OC,IM,OM}Values, and the codeset in global
locale becomes just a default codeset if application does not set
codeset to IC/OC/IM/OM.

--
hiura@sun.com/hiura@li18nux.org/hiura@kondara.org   http://www.li18nux.org
Chair, Li18nux/Linux Internationalization Initiative, Free Standards Group
Architect/Sr. Staff Engineer, Sun Microsystems, Inc,      FAX 650-786-9553


_______________________________________________
I18n mailing list
I18n@XFree86.Org
http://XFree86.Org/mailman/listinfo/i18n

----- End forwarded message -----


-- 
Warm regards,
Edward Lee(李果正)
----------------
學問深時意氣平。
----------------
To Unsubscribe: send mail to majordomo@linux.org.tw
with "unsubscribe xcin" in the body of the message

Indexed By Date Previous: Re: rxvt 2.7.2 上的游標
From: thhsieh@linux.org.tw
Next: 如何建立內碼長4byte的輸入法?
From: "hoffen_lao" <hoffen_lao@sinamail.com>
Indexed By Thread Previous: Re: rxvt 2.7.2 上的游標
From: thhsieh@linux.org.tw
Next: 如何建立內碼長4byte的輸入法?
From: "hoffen_lao" <hoffen_lao@sinamail.com>