Re: Charset ? mutt issue?
On Sun, Mar 19, 2006 at 10:11:57PM +0100, Phil Pennock wrote:
> 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
Many thanks Phil
I think you are quite right in what you have said, except that Gentoo
has not gone to utf-8 as the default yet [some talk in gentoo-dev
recently though] so I will have to do it myself :)
That said I have just looked through the procedure and for the sake of
an occasional dodgy character this one is going into the "to hard to so
pile" untill I make up a fresh kernel.
Thank you for the explantation though it was most helpful.
stuart