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

Re: Charset ? mutt issue?



On 2006-03-19 at 18:10 +0000, stuart@xxxxxxxxxxxx wrote:
> It seems I was a little hasty, If I recieve an email from
> gmail for instance then the £ signs do indeed diplay correctly.
> However if I send an email to myself using mutt then when displayed it 
> prepends an "A with an umlaut" before the £ symbol which it also displays.

The data is being sent with UTF-8, but mutt is being told that it's ISO
8859-1 by the environment and is passing that information on in the
headers.  When it comes time to view a received email, the headers are
believed.  To see this, use Control-E to edit the content-type and
change the charset parameter to UTF-8, then look at the email again.

I strongly suspect that your terminal emulator is working in UTF-8 mode;
I believe that this is now the default in Gentoo.  So the environment
doesn't match what the program hosting that environment and providing
keyboard input is using.

mutt doesn't know what the characters mean or that you meant £, only how
to interpret the octet stream provided, given the character encoding it
is told will be used by the user.  If that UTF-8 sequence happens to
also be a perfectly valid ISO 8859-15 sequence, then mutt can't spot
this.

Control+Right-click in XTerm, I believe, will show you the current
settings (they're ticked in the menu).

If you try LC_CTYPE=en_GB.UTF-8 (or whatever), then "locale charmap"
should report "UTF-8" and mutt will know that's how the octets should be
interpreted.  With the send_charset you have defined, mutt will see that
the UTF-8 £ is valid in ISO 8859-1 and so recode the characters
correctly before sending.

It's curious to see 8859-15 for the terminal and 8859-1 as preferred for
sending, then UTF-8, but I guess UTF-8 is more likely to be widely
supported than 8859-15.  If the terminal emulator were providing -15,
then it should work.  The presence of a € sign should then be enough to
cause mutt to use UTF-8 instead.

-Phil