nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] hardcoding en_US.UTF-8 in test cases

2013-02-08 18:20:16

On 2013-02-06, at 4:30 PM, Oliver Kiddle wrote:

I'm not sure how to make that as portable as possible but as a start,
perhaps trying existing LANG, LC_* values, the output of locale -a (|
sed 's/utf8/UTF-8/') or, if there is no locale command, the contents of
/usr/lib/locale.

locale(1) is part of POSIX.1, so 'locale -a' should do the trick.

Absent locale(1), the tests should just skip over everything that requires 
locale support.

Poking around in /usr/lib/locale is not on.

And, perhaps fallback to plain guessing. It seems
getcwidth can be used to test them out. It might be wise to give
preference to C.UTF-8 and then en_.*

Who on earth came up with C.UTF-8?  (Yes, that's rhetorical.)  C..* is 
impossible, by the very definition of 'C' :-P

--lyndon


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>