This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Locale with shift state
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: libc-alpha at sourceware dot org
- Date: Wed, 24 May 2017 16:25:26 -0700
- Subject: Re: Locale with shift state
- Authentication-results: sourceware.org; auth=none
- References: <842477bc-1e08-278b-2361-7d0884100fef@redhat.com>
On 05/24/2017 08:27 AM, Florian Weimer wrote:
Do we have a locale with a multi-byte character set which has shift
state (beyond a truncated multi-byte conversion)? We support such
charsets in iconv, but I can't find a locale which uses them.
I doubt whether we have any such locales.
Would such a locale even be POSIX-compatible?
It depends what you mean by "POSIX-compatible". Locking-shift encodings
cannot be defined by POSIX-compatible character set description files,
and POSIX does not require support for such encodings. See:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06.html#tag_06_04
Although a POSIX implementation could provide extensions to the
character set description format and/or a builtin locale that supports
such locking-shift encodings, I don't know of any practical POSIX
implementation that does so. I vaguely recall hearing of attempts to
build such systems many years ago for ISO-2022-JP, and that they didn't
work.