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

Re: Interaction between charset variables and alias definitions



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday, November 13 at 07:19 PM, quoth Dave Feustel:
>I changed all mutt's charset variables from "utf-8" to
>"utf-8:us-ascii:iso-8859-1" and then mutt reported IDN errors in all of
>my alias definitions. The errors disappeared when I went back to just
>"utf-8". What is the connection between charset and alias in mutt?

Wow, there's *lots* wrong with that! :)

First of all, not all of the charset-related variables accept 
colon-separated lists. The ones that do are $assumed_charset, 
$attach_charset, and $send_charset. The others, $charset and 
$config_charset, are merely the name of a *specific* charset. (Though 
you should almost never be explicitly setting $charset anyway.)

The one that is crucial to reading your aliases is $config_charset. 
Mutt assumes that you know what charset your config files are in, thus 
accepting a list of alternatives is pretty pointless.

And finally, that's a *pointless* list of alternatives even for the 
variables that accept colon-separated lists. The way the 
colon-separated lists work is that mutt tries each alternative until 
it finds one that can encode everything that needs to be encoded. 
Utf-8 can ALWAYS encode everything, so mutt will never use anything 
else; the rest of the alternatives after it are completely ignored.

The most appropriate charset settings for 99.9% of Western users are 
(credit to Alain Bench):

     set assumed_charset="windows-1252"
     set send_charset="us-ascii:iso-8859-1:iso-8859-15:windows-1252:utf-8"
     charset-hook '^x-unknown$' windows-1252
     charset-hook '^unknown-8bit$' windows-1252
     charset-hook '^iso-8859-1$' windows-1252
     charset-hook '^us-ascii$' windows-1252
     charset-hook '^none$' windows-1252
     charset-hook '^iso-8859-8-i$' iso-8859-8
     charset-hook '^gb2313$' gb18030

You may also need to set $config_charset, depending on what character 
set you've used to encode mutt's config files. But that's about it.

Does that help?

~Kyle
- -- 
In order to keep a true perspective of one's importance, everyone 
should have a dog that will worship him and a cat that will ignore 
him.
                                                        -- Dereke Bruce
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkkcRrUACgkQBkIOoMqOI17SfACg4TN6lhmI28h8PLmhcBatONQY
NDkAn1EaFUpaVavhc+VuN5BYeFLQU/JV
=Y5g9
-----END PGP SIGNATURE-----