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

Re: international characters in mutt



On Wed, Oct 10, 2001 at 02:51:58PM -0600, mark@foresthaven.com wrote:
> On Sat, Oct 06, 2001 at 04:39:48PM +0100, Stig Brautaset wrote:
> > Hi, 
> > 
> > I am having trouble getting mutt to show Norwegian characters (e.g. æ
> > and ø). The strange thing is that they work all fine on the command line,
> > and if I use more or less to view the mbox-file, they show up as they
> > are supposed to. It is, in other words, only a problem in mutt. 
> > 
> > I have read man muttrc and fiddled with settings a while, but I have not
> > managed to crack the problem. Normally the characters come up as
> > question marks, but if I put "set charset=iso-8859-1" in my ~/.muttrc I
> > get the the special characters coming up as "\345", which is even worse.
> > Does anybody have any similar experiences, and a solution to it?
> > 
> 
> I think I have found a clue about the source of this problem. I
> downloaded the mutt source code and looked at the configure options
> and found this:
> 
> --enable-locales-fix
>         on some systems, the result of isprint() can't be used reliably
>         to decide which characters are printable, even if you set the
>         LANG environment variable.  If you set this option, Mutt will
>         assume all characters in the ISO-8859-* range are printable.  If
>         you leave it unset, Mutt will attempt to use isprint() if either
>         of the environment variables LANG, LC_ALL or LC_CTYPE is set,
>         and will revert to the ISO-8859-* range if they aren't.
> 
> So, i tried building mutt with this configuration option and found that
> international characters display properly in the internal pager. I then
> built another version without setting this option and the the characters
> did not display properly, just like in the current woody mutt package.
> 
> Apparently, the mutt package is not built with this option. I suppose
> the question now is whether it should be built with it or if, instead,
> the library containing isprint ought to be fixed instead.

I downloaded the debian source package and found the following in the
README.Debian:

<cite>
l10n support
~~~~~~~~~~~~
If you want to see non-ASCII characters on a Debian system, there's no
use fiddling with the variable "charset", as described in the manual
page muttrc(5).
Instead, you'll need to have the Debian package "locales" installed on
your system and set the LANG or LC_CTYPE environment variable.
e.g. US users will want to add "export LC_CTYPE=en_US" to their ~/.bashrc.
If you have a /etc/locale.gen file read carefully the comment and do
what it says, or it will not work.
No, linux does not need --enable-locales-fix or --without-wc-funcs, so
don't bother me saying these switches cure your problems.
</cite>

So where does that leave the solution?

-- 
Property is prior to law; the sole function of the law is to
safeguard the right to property wherever it exists, wherever it is
formed, in whatever manner the worker produces it, whether
individually or in association, provided that he respects the
rights of others.
	-- Frédéric Bastiat (1801-1850)
    Rick Pasotto    rickp@telocity.com    http://www.niof.net



Reply to: