[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] nmh architecture discussion: format engine character s
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] nmh architecture discussion: format engine character set |
Date: |
Mon, 10 Aug 2015 14:08:55 -0400 |
>> - The POSIX standard functions for this, wcwidth() and wcswidth(), work
>> on the current locale, which is not guaranteed to support UTF-8 (or
>> even support 8-bit characters).
>
>Yes, but can't setlocale() temporarily change it to a UTF-8 locale?
>
>Granted, there's no guarantee that a UTF-8 locale exists and what it's
>called if it does exist, but maybe it would be appropriate to have a
>configure check to find one?
Well, unfortunately there's not a wonderful way to determine that (and
since nmh gets packaged up that's not a job autoconf can do; it needs
to be determined at runtime). I suppose you could run "locale -a" and
look for everything that contains UTF-8. Or ... utf8? Again, not a
wonderful solution (and I see some Linux systems have something like
address@hidden, which I won't pretend to understand).
Really, the POSIX character functions treat the locale and characters
themselves as opaque blocks; if you want to do something crazy like
override the native locale or work on characters that are not part of
the native locale then you're really stepping outside of the POSIX API
box. And I guess part of me really wonders why on earth that would be a
good idea.
--Ken
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, (continued)
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, David Levine, 2015/08/10
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ken Hornstein, 2015/08/10
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ralph Corderoy, 2015/08/10
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ken Hornstein, 2015/08/10
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ralph Corderoy, 2015/08/10
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ken Hornstein, 2015/08/10
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ralph Corderoy, 2015/08/10
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Christian Neukirchen, 2015/08/12
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Anthony J. Bentley, 2015/08/10
- Re: [Nmh-workers] nmh architecture discussion: format engine character set,
Ken Hornstein <=
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Oliver Kiddle, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ken Hornstein, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Jon Steinhart, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ken Hornstein, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ken Hornstein, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Earl Hood, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Earl Hood, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Jon Steinhart, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ken Hornstein, 2015/08/11
- Re: [Nmh-workers] nmh architecture discussion: format engine character set, Ralph Corderoy, 2015/08/12