[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] scan or show of UTF-encoded headers?

From: Harald Geyer
Subject: Re: [Nmh-workers] scan or show of UTF-encoded headers?
Date: Mon, 14 Feb 2005 19:35:36 +0100

>  > What do you consider a nice solution? I use the method as described
>  > by Oliver (actually that's the default of the debian package). It works
>  > satisfactory but unfortunately we have a wild mixture of latin1 and latin9
>  > in europe (thanks to MS windows not being able or willing to adapt to
>  > the new situation in the past four years) so half of the mails I 
>  > get isn't decoded at all. If anybody has a patch or an other solution,
> i guess i was thinking of a wrapper for scan or show that took care
> of setting up the locale and charset, either via argument for manually
> choosing, or maybe even by examining the message and then figuring out
> what locale/charset it should probably use, this time.

If one wants to do it manually 'export MM_CHARSET="ISO-8859-1"' works
for me, but usually you don't do that, because having a correctly decoded
subject isn't worth to type that in. Also of couse the terminal must
be able to handle the charset. With latin1 and latin9 there ist no
problem, but if you want UTF-8 you need to change your terminal too,
with what ever tool your os provides for that. With scan that wouldn't
work at all, because you can have any number of different charsets in
the headers of the many messages in one folder.

Obviously any script which tries to do the above runs into the same
problem that prevents nmh from doing it itself: The script would need
to know which charsets the terminal can handle and how to tell it.
Also changing the terminal might confuse other programs.

I guess it would be much easier und less prone to error to just
implement transcoding of messages through iconv instead of trying
to adapt the display on a per message basis.

I remember the gnus people using big sets of tables to do a mixture
of transcoding and unifying between character sets which led to
messages being split into several parts of different character sets,
when it didn't work correctly. I don't know what had been their reason
to not use iconv.

An other, less universal but easier implementable, approach would be
to add the possibility to tell nmh that the terminal can handle more than
one character set. In case of messages which are almost plain ascii
one would get the correct result interspersed with "broken" glyphs.
Anything that would need heavy transcoding is unlikely to be
displayable on an ascii terminal at all.

> (i confess i don't exchange a lot of mail with non-english/
> ascii-speaking correspondents, and being american/english/ascii
> guy myself, have never really had to adjust locales or charsets etc.
> which is to say, i may not fully understand what i'm asking for.  :-)

Locales are a nice thing, but only as long as everybody is using the
same as you do ...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]