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

Re: Character Set Difficulty



On Mon, Jan 12, 2004 at 12:31:03AM -0500, timothy parkinson wrote:

> I have an issue where mails coming to me display certain characters as the "?"
> character instead.  Apostrophe's "'" and dashes "-" seem to be the most common
> characters affected.
> 
> I'm pretty sure it relates to the character set that the mail is in, as
> evidenced by the Content-Type header:
> 
>   Content-Type: text/plain; charset="iso-8859-1"

Yup, that means the email was written in the ISO-8859-1 charset.  Mutt
uses your libc to determine what can and can't be displayed properly,
and displays the latter as "?" by default.

> If I open the file containing the mail in vim - it displays the characters as
> codes like "=B4" and "=96".

That's probably because the mail also contains a header like this:
Content-Encoding: quoted-printable

You can try saving the body of the mail to a file from within Mutt itself
(so it decodes the thing), and then opening that file with VIM.  However,
it's worth noting that VIM isn't a very good indicator of whether or
not your libc is setup correctly.  I'd suggest reading the archives of
this list, as the subject's been discussed numerous times already, and
I don't think anybody but you really wants to have to read the procedure
yet again in his inbox ;-)

> Could somebody possibly point me in the right direction to fix this?  Much
> thanks in advance...

Well, you need to tell libc what charset your terminal uses.  I have
the following in my ~/.bashrc, for example:
$ grep LC_ALL ~/.bashrc
LC_ALL=es_ES.UTF-8
export LC_ALL

What you should use will depend on many factors.  As I said above, reading
the archives is a good idea before posting a question.  If after working
with the archives you still have troubles that aren't solved there,
post here and people won't ignore you.

 - Dave

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgpf3jtzMndCp.pgp
Description: PGP signature