Hi, * Fernando Canizo <[EMAIL PROTECTED]> [27/07/05 14:14]: > > El Wed, Jul 27, 2005 at 09:04:29AM +0300, Moshe Kaminsky me decĂa: > > * Fernando Canizo <[EMAIL PROTECTED]> [27/07/05 07:15]: > > > > > > Hi all. > > > > > > I'm having trouble with my encoding using mutt + vim + utf-8, > > > basically mi emails are sent with wrong encoding when *replying*. I've > > > tracked the problem, searched, readed FAQs and i found that maybe my > > > problem is this: that while mutt is linked to libncursesw (wide > > > library) vim is to libncurses (normal), this is the output of ldd: > > > > I find it hard to believe that this is the problem. You say that you can > > use utf8 when you are composing (or writing some other stuff), right? > > What are the values of 'encoding' and 'fileencoding' in vim when > > replying? > > Moshe > > Like i said to Richard, maybe you're right. I mean: i can write an > utf-8 file from scratch using vim alone, so why would not when > invoking vim from mutt? Maybe is that mutt is telling vim something > incorrect when they communicate. > > Well, i'll give more information, but this gonna grow large ;) > [snip] > > checking if the locales work with perl: > ~$ perl -e "" > ok doesn't show anything
That's one use of perl I never thought about :)
>
> checking if perl is doing the right things by setting an erroneous
> locale:
> ~$ env LC_ALL=nocharset perl -e ""
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
> LANGUAGE = "es_AR.utf-8",
> LC_ALL = "nocharset",
> LC_CTYPE = "es_AR.utf-8",
> LANG = "es_AR.utf-8"
> are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
>
> ok, it cries, so it's working ok
>
> my ~/.signature is in utf-8, my ~/.alias is too
>
> i got this in my ~/.vimrc:
> set encoding=utf-8
> set fileencoding=utf-8
Please try removing this setting, then check the value after vim reads
the file (when you reply). Vim sets this option when editing an existing
file according to what it thinks the encoding of the file to be. Also,
you might want to try something like
:e ++enc=utf-8 <file>
This will force vim to read this file as a utf-8 file. Also, what is the
value of 'fileencodings'?
> set termencoding=utf-8
>
> and when mutt invokes vim i re-check that this is ok, and is ok (i
> mean i check in runtime and it obbeys the configuration)
>
> i got this in my ~/.muttrc:
> set send_charset="us-ascii:utf-8"
Might want to try just "utf-8", but I don't think it will matter.
> set charset="utf-8"
> set locale="es_AR.utf8"
>
> from the mutt man i know this settings should not be necessary, since
> the system is configured ok, but i try with and without and get no
> difference.
>
> Ok, that's all concerning configuration. Now i tell you how the
> problem works: in mutt, if i compose a mail from scratch, without
> anything, not even signature, and put a LATIN SMALL LETTER A WITH
> ACUTE (got that name from unicode chart), and then send it to myself,
> and to a friend, my friend sees it ok and i too.
>
> But if now i reply to this same mail, when vim comes with the quoted
> text that mutt passes to it y see garbage.
Can you include one of this characters in your reply?
>
> So mutt is ok seeing and sending utf-8, vim is ok writing and reading
> utf-8, but when both "cooperate", things get screwed.
>
> I investigate what was in the archives, so i saved a copy (using 'C'
> command from mutt) of the first message (the one i receive from me)
> and file says: 'UTF-8 Unicode mail text', check what's inside with
> hexedit and see that LATIN SMALL LETTER A WITH ACUTE is encoded with
> this hex: C3 A1 (which is not 00 E1 from unicode chart from
> http://www.unicode.org/charts/)
I think this is just the way these characters are represented in utf-8.
Moshe
pgpJzPzJfarsh.pgp
Description: PGP signature

