[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nl_langinfo(CODESET) again
Edmund GRIMLEY EVANS writes:
> In glibc-2.2, will the charset returned by nl_langinfo(CODESET) be a
> MIME-compatible name such as "us-ascii" or "iso-8859-15"?
No. The value of nl_langinfo(CODESET) is system dependent and not
intended to fulfill MIME standards. Some of the values happen to
coincide with the corresponding MIME name, some don't. Here is the
list I made for glibc-2.1. glibc-2.2 will support many more locales,
but you get the idea.
name a MIME name?
ANSI_X3.4-1968 no
ISO-8859-1 yes
ISO-8859-2 yes
ISO-8859-5 yes
ISO-8859-7 yes
ISO-8859-8 yes
ISO-8859-9 yes
ISO-8859-13 no
KOI8-R yes
KOI8-U yes
UTF-8 yes
> I recently put code into Mutt to use nl_langinfo(CODESET) for the
> default charset, and people are already complaining about ill-effects
> caused by "ISO8859-15", for example.
"ISO8859-15"/"ISO-8859-15" is not a MIME registered charsets. You
cannot send out a mail in this charset. I'd recommend to send it out
as US-ASCII if it contains only ASCII characters, and UTF-8 (or UTF-7)
otherwise. Mailers are supposed to support UTF-8 for 1.5 years now.
Bruno
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/