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

Re: charset question



* martin f krafft [Sun, 18 Jul 2004 17:51:04 +0200]:

> The results seem nondeterministic. Sometimes utf-8, sometimes
> latin1. there must be something I am overlooking.

  martin and i solved this by private mail. problem was a ~/.signature
  file in iso-8859-1 when `locale charmap` was utf-8.

  some explanation bits follow.

* Adeodato Simó [Tue, 20 Jul 2004 15:44:18 +0200]:
> * martin f krafft [Tue, 20 Jul 2004 15:36:26 +0200]:
> > also sprach Adeodato Simó <asp16@xxxxxxxxx> [2004.07.20.1531 +0200]:
> > > * martin f krafft [Tue, 20 Jul 2004 15:24:44 +0200]:

> > > > I think the only one thing that's really different is the signature,
> > > > which in and of itself is a ISO8859-1 file. The one for my normal
> > > > address is a us-ascii file.

> > >   convert it to utf-8. your signature, as the text passed from your
> > >   editor to mutt, should be in the `locale charmap` encoding. i.e.,
> > >   utf-8 in your case.

> > >   later, mutt figures out if latin1 it's enough and does the conversion
> > >   itself according to $send_charset, i just checked.

> > i am not sure i understand. the message is composed in mutt and
> > turns out to be latin1-compatible. why does mutt choose utf-8? does
> > it choose it before or after importing the signature?

>   mutt takes the signature, puts it in a new file and invokes your
>   $EDITOR. mine is vim, and vim detects that the text is in latin1
>   (since it contains the signature, and the signature was latin1, not
>   utf-8). so, vim detects that and saves the message in latin1, then
>   returns the control to mutt.

>   mutt takes the saved file, which it expects to be in `locale charmap`,
>   i.e. utf-8. the problem is: if it *were* a valid utf-8 file, which is
>   not, mutt has no trouble in detecting latin1-compatibility and
>   converting the message. but: the message is *unvalid* utf-8 (it is
>   latin1, as we saw), so mutt chokes and leaves the message untouched,
>   assuming the user knows what he is doing. and labels the message as
>   utf-8 in the header.

* martin f krafft [Tue, 20 Jul 2004 16:08:58 +0200]:

> Aha. Now this makes sense. Could you post your reply to mutt-user
> too?

> Thanks a lot for the explanation! Problem solved.

-- 
Adeodato Simó
    EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621
 
I don't want to achieve immortality through my work. I want to achieve
immortality throguh not dying.
                -- Woody Allen