On Sat, Oct 18, 2003 at 10:39:21PM +0300, Tuomo Valkonen wrote:
> On Sat, Oct 18, 2003 at 08:45:53PM +0200, Per Olofsson wrote:
> > So... what about using UTF-8 internally but converting strings to the
> > current locale when calling XmbDrawString? Or would that be too slow?
> 
> I don't know about the performance of iconv, but I don't like all the
> extra memory management even if it were fast.
> 
> Maybe we should use the mb stuff, but only when the locale is utf-8
> or 8-bit? This would require an awful kludge to check that the locale
> is really utf-8 or 8-bit (http://iki.fi/tuomov/lt.c should be such
> a kludge I wrote last spring, not sure if it works always or everwhere), 
> changing the CF_UTF8 checks to run-time checks and abstracting some of 
> the #ifdefed code from query/edln.c to ioncore/strings.c.

Ok, now I'm having font trouble after this conversion. X simply won't
load _any_ font with LC_CTYPE=fi_FI. With LC_TYPE=fi_FI.whatever_character_set
the code either resets to POSIX or works ok depending on whether
whatever_character_set has been set in /etc/locale.gen (Debian).
Also the code always uses the Xmb routines now and fails with non-ASCII
characters when no proper locale is set. The locale-unaware XDrawString
and such routines don't have this problem. I don't think the Xutf8
routines are what is broken here. It's the whole concept of locales
or XFree86's support for them. Locales simply suck.

-- 
Tuomo

Reply via email to