Re: utf8 encoding problem, but which part?
- To: mutt-users@xxxxxxxx
- Subject: Re: utf8 encoding problem, but which part?
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Mon, 29 Oct 2007 08:22:08 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date:from:to:subject:message-id:references:mime-version:content-type:in-reply-to; q=dns/txt; s=default; bh=Q0VqYsXGA+GY6m/cqLMu5Ks84aQ=; b=JS8k6u3EUvo5AZi8msUP8xn/qE0ZJg2neMSwsYP3iDCQLvPnZv9AjOVyoKxfFDIp5kkSwEF4sMcIymRNiS9i+hju+ItHDZVo81fV5wNHkLCNrckO4dYrPb74ereXAr9SWHbVX0eM52kex75RLWFYQWiXz4BOm1JxbH1TQyClMz4=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=Rjb5b5nniYk0WWKncjq1zXuZoriofPoLQ53x3pvrQzsF1j9WWsWfQb2CPoT48dh1R8kI3fZmQRBoSB4mt07Hav7OTrVBQ26y2YKJDBC1UXEJ+DcVvtj6HG+g9qpA+sguxpxRoYEGCei2vRY4TLvwXWzwHJSm+LSO5NqaFxR+qG8=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent;
- In-reply-to: <20071016071118.GA27783@neptun>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- References: <20071016071118.GA27783@neptun>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.16 (2007-09-19)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday, October 16 at 09:11 AM, quoth Raphael Brunner:
> my problem isn't clear for me, what it is exactly.
Nor is it for anyone you're describing it to.
> I became a mail from russia with koi8-u encoding (in mailheader).
You mean you *received* such an email?
> My system is debian stable. In muttrc, I defined 'set
> charset=utf-8',
It's typically (unless you know what you're doing) better to let mutt
detect the charset, so take that out of your muttrc.
> the terminal is mlterm (I tried also xterm with the same result)
I don't know anything about mlterm, but xterm can't display the full
utf-8 character set unless you do to things: first, you must have it
using a font that has all the right characters in it, and second, you
must run xterm with the correct options (e.g. use the wrapper script
`uxterm`).
> and locale output (see below) shows good. Now, the mailcontent in
> mutt is right,
Good.
> but if I reply to this (mails open with vim), then there are strange
> signs there (but only the not-ascii). Regardless if I set ':set
> encoding=utf-8' in vim or not, vim don't show this characters
> correct.
Firstly, setting the encoding in vim to be utf-8 only changes vim's
internal representation of characters, it does NOT change vim's
understanding of the file it's editing. Here's a clip from vim's
documentation:
NOTE: Changing this option will not change the encoding of the
existing text in Vim. It may cause non-ASCII text to become invalid.
It should normally be kept at its default value, or set when Vim
starts up. See |multibyte|.
More helpfully:
The character encoding of files can be different from 'encoding'.
This is specified with 'fileencoding'. The conversion is done with
iconv() or as specified with 'charconvert'.
Normally 'encoding' will be equal to your current locale. This will
be the default if Vim recognizes your environment settings. If
'encoding' is not set to the current locale, 'termencoding' must be
set to convert typed and displayed text. See |encoding-table|.
So you want to leave 'encoding' alone, and change 'fileencoding'.
What you need to do is figure out what character set mutt is saving
its temporary files as. I believe (but I haven't checked) that mutt
doesn't do any conversion, and saves the temporary files in the same
character set as the email.
> I tried also emacs, it display exact the same like vim.
Probably because it assumed (just like vim) that the text was encoded
in either us-ascii or utf-8.
Hope that helps,
~Kyle
- --
When ideas fail, words come in very handy.
-- Johann Wolfgang von Goethe
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFHJd6ABkIOoMqOI14RAp0wAKDdBnu6oDPuR4t2KoJOo7c1Jq8Q7gCgzwNc
JbXhVAaXhnOI+mZmbRiQxss=
=dfo6
-----END PGP SIGNATURE-----