On Sat, May 01, 2004 at 12:17:27AM +0200, Per Olofsson wrote:
> Which character sets does Ion support if you run it without the -i18n
> option? Is it hardwired to ISO-8859-1 or does any 8-bit character set
> work? Is there any significance in the fact that no locale functions
> are called?

Without -i18n Ion does not initialise locale support in libc and thus 
doesn't use multibyte routines. Therefore the in principle only ASCII 
can be guaranteed to work. (Sometimes not initialising locale is as 
if the locale was POSIX and at other times true POSIX locale is more 
restrictive.) In practise any 8-bit single-byte encoding/character set
should work fine -- assuming that the rest of the system uses the same
encoding.

The -i18n flag makes Ion initialise locale support in libc and to use
multibyte string routines where more than ASCII might be expected. 
Statefull encodings, however, probably won't work. But no-one in their
right mind would use such -- or have invented one in the first place.

The reason why -i18n is not enabled by default is that in an UTF-8
locale it may take an intolerably long time to load the fonts using
the kludge in de/fontset.c and also Xlib string drawing routine 
support for UTF-8 is totally broken and unlikely to be fixed. :-(
(Decoding a multibyte string into fonts and characters within fonts 
is done on client-side and it is this decoding that is broken wrt. 
overlapping fonts and everyone just seems to be reinventing the wheel
instead of fixing Xlib :-(.) In a non-UTF-8 locale it should be safe to
enable -i18n by default, though.

-- 
Tuomo

Reply via email to