From owner-freebsd-i18n Wed Dec 20 11:50: 7 2000 From owner-freebsd-i18n@FreeBSD.ORG Wed Dec 20 11:50:02 2000 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mail.suse.co.uk (mail.suse.co.uk [62.232.64.211]) by hub.freebsd.org (Postfix) with ESMTP id 40EF937B404 for ; Wed, 20 Dec 2000 11:50:02 -0800 (PST) Received: from george.suse.co.uk (George.suse.co.uk [10.32.0.1]) by mail.suse.co.uk (Postfix) with ESMTP id 4B4EC74F; Wed, 20 Dec 2000 19:50:53 +0000 (GMT) Date: Wed, 20 Dec 2000 19:50:53 +0000 (GMT) From: Robert Brady To: Noriyuki Soda Cc: bsd-locale@hauN.org, core@XFree86.Org, dawes@XFree86.Org, i18n@freebsd.org, i18n@XFree86.Org, li18nux@li18nux.net, tech-x11@netbsd.org, tech@openbsd.org, tshiozak@bsdclub.org Subject: Re: [I18n] Xutf* and friends In-Reply-To: <200012201940.EAA03957@srapc342.sra.co.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-i18n@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 21 Dec 2000, Noriyuki Soda wrote: > > And there is another issue, that en_US.UTF-8 may have a different fontset > > than zh_CN.UTF-8 and ja_JP.UTF-8 - if we just do > > > > setlocale(en_US_UTF8_locale), > > > > you effectively break locales which need a different fontset than > > en_US. (I suppose I have no need to tell you about the CJK font style > > variations) > > If you took this issue seriously, you must noticed that what you > had to do in this area is not to add the Xutf* APIs, but adding > the following API: I do take this issue seriously. And this had not occured to me. > char *XFree86UTF8Locale(locale_name); > ... this function returns corresponding UTF-8 locale to > argument locale. > e.g. XFree86UTF8Locale("ja_JP.eucJP") returns "ja_JP.UTF-8". > Then you can become to write the following code fragment: > current_locale = setlocale(LC_CTYPE, NULL); > setlocale(LC_CTYPE, XFree86UnicodeLocale(current_locale)); > ... create Unicode FontSet here ... > setlocale(LC_CTYPE, current_locale); > > In other words, what you had to do in this area was to add ONLY ONE API, > rather than bunch of new Xutf8 APIs. I'm glad to see a slightly more sensible suggestion. However, this still doesn't solve the problems of * UTF-8 input * UTF-8 string <-> COMPOUND_TEXT string conversion * thread safety * ickiness * requiring UTF-8 locales to be installed And I'm sorry, but lack of ickiness counts for a lot. > And Xutf8* APIs don't solve this problem. Indeed. > > Have you got a patch to do that? > > Patch to X11 part is quite trivial, isn't it? So in other words, you should be able to do it quite quickly. I look forward to seeing your patch. Myself, I don't think its very high priority, so I won't be writing it, but I won't object to it. > As I already said, current implementation of Xutf8 APIs isn't good > enough. It should become as big as IIIMXCF implementation. Whatever. -- Robert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-i18n" in the body of the message