Juliusz Chroboczek writes:
> In a number of places, a program must interact with its environment
> in a locale-independent manner. This includes selection conversion,
> keyboard input, and arguably interaction with the file system.
I agree that in _some_ places programs exchange text in locale
independent formats. For example, strings in databases should better
be stored in a locale independent format, so that users in different
locales can access it.
But we need to look at it case by case.
> Lack of understanding of this basic principle leads to absurdities
> such as Emacs' ``selection-coding-system'' variable.
What led to 'selection-coding-system' is that some programs are ICCCM
compliant (use locale independent format for the selection and
cutbuffer) and some are not.
So we'll get a mess everytime it's not clear whether a mechanism uses
locale-dependent or -independent text representation.
* Selection: Here ICCCM says it's locale independent.
* Keyboard input: An XKeyEvent is locale independent. Input read
through XmbLookupString is locale dependent.
Input read from /dev/tty is assumed to be locale dependent if the
IEXTEN flag is set.
* Filenames: The POSIX spec for 'ls' implies that 'ls' treats
filenames as locale (LC_CTYPE) dependent. This means all other
programs must do the same.
Bruno
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/