Gentoo Archives: gentoo-user

From: Moshe Kaminsky <kaminsky@××××××××××××.il>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: recompiling vim linked to libncursesw
Date: Wed, 27 Jul 2005 11:49:22
Message-Id: 20050727114527.GA19387@kaminsky.dyndns.org
In Reply to: Re: [gentoo-user] Re: recompiling vim linked to libncursesw by Fernando Canizo
1 Hi,
2 * Fernando Canizo <conan@××××××××××.ar> [27/07/05 14:14]:
3 >
4 > El Wed, Jul 27, 2005 at 09:04:29AM +0300, Moshe Kaminsky me decía:
5 > > * Fernando Canizo <conan@××××××××××.ar> [27/07/05 07:15]:
6 > > >
7 > > > Hi all.
8 > > >
9 > > > I'm having trouble with my encoding using mutt + vim + utf-8,
10 > > > basically mi emails are sent with wrong encoding when *replying*. I've
11 > > > tracked the problem, searched, readed FAQs and i found that maybe my
12 > > > problem is this: that while mutt is linked to libncursesw (wide
13 > > > library) vim is to libncurses (normal), this is the output of ldd:
14 > >
15 > > I find it hard to believe that this is the problem. You say that you can
16 > > use utf8 when you are composing (or writing some other stuff), right?
17 > > What are the values of 'encoding' and 'fileencoding' in vim when
18 > > replying?
19 > > Moshe
20 >
21 > Like i said to Richard, maybe you're right. I mean: i can write an
22 > utf-8 file from scratch using vim alone, so why would not when
23 > invoking vim from mutt? Maybe is that mutt is telling vim something
24 > incorrect when they communicate.
25 >
26 > Well, i'll give more information, but this gonna grow large ;)
27 >
28 [snip]
29 >
30 > checking if the locales work with perl:
31 > ~$ perl -e ""
32 > ok doesn't show anything
33
34 That's one use of perl I never thought about :)
35 >
36 > checking if perl is doing the right things by setting an erroneous
37 > locale:
38 > ~$ env LC_ALL=nocharset perl -e ""
39 > perl: warning: Setting locale failed.
40 > perl: warning: Please check that your locale settings:
41 > LANGUAGE = "es_AR.utf-8",
42 > LC_ALL = "nocharset",
43 > LC_CTYPE = "es_AR.utf-8",
44 > LANG = "es_AR.utf-8"
45 > are supported and installed on your system.
46 > perl: warning: Falling back to the standard locale ("C").
47 >
48 > ok, it cries, so it's working ok
49 >
50 > my ~/.signature is in utf-8, my ~/.alias is too
51 >
52 > i got this in my ~/.vimrc:
53 > set encoding=utf-8
54 > set fileencoding=utf-8
55
56 Please try removing this setting, then check the value after vim reads
57 the file (when you reply). Vim sets this option when editing an existing
58 file according to what it thinks the encoding of the file to be. Also,
59 you might want to try something like
60
61 :e ++enc=utf-8 <file>
62
63 This will force vim to read this file as a utf-8 file. Also, what is the
64 value of 'fileencodings'?
65
66 > set termencoding=utf-8
67 >
68 > and when mutt invokes vim i re-check that this is ok, and is ok (i
69 > mean i check in runtime and it obbeys the configuration)
70 >
71 > i got this in my ~/.muttrc:
72 > set send_charset="us-ascii:utf-8"
73
74 Might want to try just "utf-8", but I don't think it will matter.
75
76 > set charset="utf-8"
77 > set locale="es_AR.utf8"
78 >
79 > from the mutt man i know this settings should not be necessary, since
80 > the system is configured ok, but i try with and without and get no
81 > difference.
82 >
83 > Ok, that's all concerning configuration. Now i tell you how the
84 > problem works: in mutt, if i compose a mail from scratch, without
85 > anything, not even signature, and put a LATIN SMALL LETTER A WITH
86 > ACUTE (got that name from unicode chart), and then send it to myself,
87 > and to a friend, my friend sees it ok and i too.
88 >
89 > But if now i reply to this same mail, when vim comes with the quoted
90 > text that mutt passes to it y see garbage.
91
92 Can you include one of this characters in your reply?
93
94 >
95 > So mutt is ok seeing and sending utf-8, vim is ok writing and reading
96 > utf-8, but when both "cooperate", things get screwed.
97 >
98 > I investigate what was in the archives, so i saved a copy (using 'C'
99 > command from mutt) of the first message (the one i receive from me)
100 > and file says: 'UTF-8 Unicode mail text', check what's inside with
101 > hexedit and see that LATIN SMALL LETTER A WITH ACUTE is encoded with
102 > this hex: C3 A1 (which is not 00 E1 from unicode chart from
103 > http://www.unicode.org/charts/)
104
105 I think this is just the way these characters are represented in utf-8.
106
107 Moshe

Replies

Subject Author
Re: [gentoo-user] Re: recompiling vim linked to libncursesw Andreas Claesson <andreas.claesson@×××××.com>
Re: [gentoo-user] Re: recompiling vim linked to libncursesw Fernando Canizo <conan@××××××××××.ar>