On 20100728_002004, Nicolas Williams wrote:
> On Tue, Jul 27, 2010 at 10:54:42PM -0600, Paul E Condon wrote:
> > On 20100727_155630, Kyle Wheeler wrote:
> > > On Tuesday, July 27 at 12:35 PM, quoth Paul E Condon:
> > > > 1) The short answer does not work. My copy of Mutt informs me that 
> > > > LC_TYPE is not a recognized variable name.
> > > 
> > 
> > The line in the web page is;
> > Short answer: set LC_CTYPE=en_US.ISO-8859-1. 
> > This is not sh/bash syntax or csh/tcsh syntax, but seems to be muttrc syntax
> 
> LC_* are a big hammer.  You shouldn't want to use that hammer.
> 
> mutt is smart enough to do codeset conversions from those used in
> e-mails to the one used in your terminal.  Forcing your terminal's
> codeset to match just one of those commonly used by your correspondents
> is not the answer.
> 
> The best thing to do, if you want[*] the most possible non-ASCII
> characters to be displayed correctly, is to run in a Unicode locale
> (e.g., en_US.UTF-8) and leave the LC_* and LANG environment variables
> alone, and instead follow the advice already given regarding the
> charset-hook (see below about iconv-hook as well).  If you find this all
> annoying, do consider that it isn't mutt's fault, not your operating
> system's.
> 
> > > This has been posted to the list many times, but yes, the recommended 
> > > solution is to add the following to your muttrc:
> > > 
> > >      charset-hook ^unknown-8bit$     windows-1252
> > >      charset-hook ^x-user-defined$   windows-1252
> > >      charset-hook ^iso-8859-1$       windows-1252
> > >      charset-hook ^us-ascii$         windows-1252
> > 
> > I don't, to my knowledge have windows-1252 on my system. Is this
> > something that is just there by default on debian, or do I need to get
> > it from somewhere and install it? I ask because without something more
> > these four lines don't fix the problem for me. 
> 
> The iconv(1) command can list the codesets installed on your system.
> For example, on Solaris I get:
> 
> % iconv -l | grep 1252
>     CP1252 (CP1252, CP-1252, CP_1252, WINDOWS-1252, ANSI-1252, ANSI1252, 
> 1252),
> % 
> 
> On RHEL5 I get:
> 
> % iconv -l |grep 1252
> CP1252//
> WINDOWS-1252//
> % 
> 
> If you have those, then the above ought to work, if I understand
> correctly, though you may also need to add an "iconv-hook".  For
> example, if iconv -l listed CP1252 but not WINDOWS-1252, then you might
> want to add this to your .muttrc:
> 
>      charset-hook ^unknown-8bit$     windows-1252
>      charset-hook windows-1252       CP1252
>      ...
> 
> As to how to install missing iconv modules, if indeed they are missing,
> you'll have to ask someone who knows Debian better than I.
> 
> Nico
> 
> [*] Even if you don't understand them, being able to copy and paste
>     strings with characters you don't know is nice.  Of course, you
>     could consider non-ASCII an afront (er, why?), and/or a security
>     risk.  So you might want to run in non-Unicode locales, for all I
>     know.  Indeed, confusable characters do pose real security risks,
>     but IMO this should be handled in a system-wide fashion, such as via
>     fonts (e.g., by ensuring that confusable characters not from the
>     languages you are fluent with, are rendered in a non-confusable
>     manner).

Thanks for tip about iconv. I do have both WINDOWS-1252 and CP1252 on my
computer. So the second line should not be needed. While composing this
email I suddenly realized that the charset names are probably case sensitive
and my WINDOWS-1252 is not going to work with windows-1252, as used in
the advice given on this list. I changed the advice magic strings to match
what Squeeze is currently programmed to expect, and IT WORKS. Problem solved
until DDs move to what appears to be the Linux community standard of mostly
lower case in charset names.

Thanks to all.

-- 
Paul E Condon           
pecon...@mesanetworks.net

Reply via email to