<<< Date Index >>>     <<< Thread Index >>>

Re: charset question



Hello Martin,

 On Friday, July 16, 2004 at 12:43:38 PM +0200, Martin F. Krafft wrote:

> I recently switched my systems to Unicode, which is lovely.
>| set assumed_charset = "utf-8:iso-8859-15:iso-8859-1:latin1:us-ascii"

    Short: Can't work. You probably want single "windows-1252" here (it
covers itself, and in turn Latin-1, and US-Ascii). You will not have UTF
nor Latin-9 assuming, though.

    Long: This setting acts both on raw headers and bodies. For headers,
multiple charsets are possible. Leading something as
"utf-8:windows-1252" to *seem* to be a good setting. But for bodies,
only the first charset is used. As you /probably/ don't want UTF-8, you
need to set CP-1252 as first. Finally there is no point to set UTF
*after* 1252: It will nearly never be selected, even for headers,
because nearly any valid UTF byte sequence is also a valid 1252 char
sequence. Hence the single $assumed_charset="windows-1252".


>| set file_charset = "us-ascii:latin1:iso-8859-1:iso-8859-15:utf-8"
> produces exactly the desired results for attachments

    I don't think so, or only by accident: Here Latin-9 files are always
wrongly seen as L1, and UTF-8 files are half time wrongly seen as L1
also. Highly inconsistent. May I suggest something as:

| set file_charset="ucs-2:utf-8:windows-1252"

    You will not have Latin-9 support, though. I was told that acts
similarly to vim's "ucs-bom,utf-8,latin1" fileencodings auto-guessing
feature. People frequently attaching platform specific charsets may want
to study inserting them before, after, or as a replacement of 1252.


>| set send_charset = "us-ascii:latin1:iso-8859-1:iso-8859-15:utf-8"

    Better remove ":latin1" from here. Mutt will send mails and text
attachments in best adapted first necessary and sufficient charset:
Better chances to be correctly read anywhere by anyone on any platform.


Bye!    Alain.
-- 
Everything about locales on Sven Mascheck's excellent site at new
location <URL:http://www.in-ulm.de/~mascheck/locale/>. The little tester
utility is at <URL:http://www.in-ulm.de/~mascheck/locale/checklocale.c>.