>> I am wondering if we can assume that nl_langinfo() exists on all >> platforms that we care about. It's part of POSIX. I ask because if >> it doesn't exist I'm not sure how we get the current character set. >> My feeling is in this day and age we should assume it exists. > >I would assume a locale of "C" in the absence of ml_langinfo(). That's >the default locale if there are no $LANG or $LC_* definitions in scope, >and the behaviour is intended to be backwards compatible with the >pre-locale UNIX behaviour.
So nl_langinfo(CODESET) returns "US-ASCII" if we're in the C locale. That seems ... sub-optimal, and wrong, if it doesn't exist. Also, IS there a platform we care about where nl_langinfo() doesn't exist? --Ken _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
