nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] character sets and localization


From: Oliver Kiddle
Subject: Re: [Nmh-workers] character sets and localization
Date: Tue, 16 Nov 2010 00:22:35 +0100

"Lyndon Nerenberg (VE6BBM/VE7TFX)" wrote:
> Is there an alternative out there to the GNU iconv implementation?
> It's not exactly the most portable piece of code to non-linux hosts.
> (E.g.  I've been fighting with it on MacOS recently.)

Some other systems, e.g. Solaris, come with their own iconv. It's often
better to use these instead of GNU libiconv in part because they are
more likely to make sense of whatever nl_langinfo(CODESET) outputs (this
is quite variable in the case of plain ASCII). I'm not sure whether GNU
libiconv is the same thing as the glibc one. I've also got no idea about
what Mac OS comes with. A common source of problems is if iconv.h gets
picked up from some GNU libiconv installation but it then doesn't link
against -liconv because iconv exists in libc.

There are other alternatives such as ICU but it is probably best to avoid
supporting multiple charset conversion libraries unless we really need to.
I think the approach in the current code of using iconv and sticking
to the current locale's charset for output rather than hardcoding for
UTF-8 is the best approach. It could be quite useful to allow mh-format(5)
format files to use UTF-8 (either by hardcoding them, support \u escapes
or allowing a charset to be specified).

Oliver



reply via email to

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