Re: setting default encodings
On Friday, April 15, 2005 at 5:38:48 PM -0400, Paul Tremblay wrote:
> On Fri, Apr 15, 2005 at 11:04:28AM +0200, Alain Bench wrote:
>> the LC_CTYPE value is already exported before, somewhere else in
>> startup scripts. Drop this too, and check with "locale" and
>> "locale charmap" that all is clean.
> I'll try to figure out how to do this.
Global search in /etc, $HOME, desktop shortcuts and so on, studying
usefullness or droppability.
But after only dropping the said LC_CTYPE="en_US.UTF-8" line, check
this directly in Mutt please:
| :set &charset ?charset
| charset="utf-8"
|
| !printenv | egrep "^(LANG|LC_)" | sort ; locale charmap ; sleep 42
| LANG=fr_FR.utf-8@euro
| LC_COLLATE=C
| LC_MESSAGES=C
| UTF-8
>| iconv-hook CP850 cp850
>| iconv-hook ISO-8859-1 ISO8859-1
>| iconv-hook ISO-8859-7 ISO8859-7
>| iconv-hook ISO-8859-9 ISO8859-9
>| iconv-hook utf-8 utf-8
You can drop all 5 lines: Useless with libiconv 1.9. Do you have
charset-hooks?
> I am running Mandrake Linux 9.1.
Which version of Glibc? How have you overriden the Glibc integrated
iconv with libiconv 1.9?
> if I reply to the email in which you included the unicode star, and cc
> myself, you will see the star, and I will see â\230\205.
Toby included the star: We both see it. Then you reply or forward: I
see star, but you see garbage? Hum... Illogical. Most probably I would
see garbage too. Let's try practice?
BTW about your 2 mails: My mail was Latin-1, but both your replies
were UTF-8 falsely labelled Latin-1. So I don't see say "â" (lowercase a
circumflex), but "â" (uppercase A tilde, cent sign). Quote corrected.
On Friday, April 15, 2005 at 5:51:21 PM -0400, Paul Tremblay wrote:
> I just changed my text editor to emacs, and it handled the utf-8 just
> fine. So apparently vim wasn't saving the file as utf-8, which would
> explain why after I quit out of vim, I saw that mutt was trying to
> send the message as latin1. When I used emacs, it imediately
> recognized the file as utf-8 and encoded it properly.
The general rule is that for Mutt the editor must dumbly read and
save in current $charset. Of course $charset should be automagically
derived from current locale, and locale must be consistent with actual
charset of used terminal.
Both vim and emacs are smart editors auto-sensing and recoding
file's charset. They confuse things by sometimes hiding or even creating
problems. I strongly advice disabling editor's auto-sensing feature when
called from Mutt.
More precisely: Editor auto-sensing on read but saving in $charset
may well be acceptable, only for those-who-know-what-they-do. But editor
auto-sensing on read and saving in same charset is evil: It works
perfectly in good conditions. But when something goes wrong, it hides
you the problem, let you quote and type your message apparently well,
and finally let you send garbage. WYSINWYS.
Bye! Alain.
--
Hotmail users break umlauts for everyone else on a mailing list!
They should stop doing so immediately!
« MSN considered HARMFUL » PCC CB on MU. © June 2002