re: Bug#175370: A reliable way to get LC_CTYPE encoding
On Wed, Jan 15, 2003 at 09:34:45AM -0600, Steve Langasek wrote:
> On Wed, Jan 15, 2003 at 07:31:42AM -0600, Colin Watson wrote:
> > On Tue, Jan 14, 2003 at 05:40:45PM -0600, Steve Langasek wrote:
> > > FWIW, I did some research into nl_langinfo() for an upstream recently,
> > > and found that it's implemented on at least these platforms:
> > >
> > > Linux (glibc)
> > > FreeBSD
> > > NetBSD
> > > Solaris
> > > AIX
> > Hmm, groff needed a patch not all that long ago because Debian
> > GNU/NetBSD didn't have nl_langinfo(CHARSET). Maybe it's a recent
^^^^^^^ I meant CODESET ...
> > addition.
> According to NetBSD's own on-line manpages (I've misplaced the URL ATM),
> they've supported it since 1994. Perhaps it's implemented but buggy?
Bug #130356 prompted the change to groff. The BSD list may know more.
> Is Debian GNU/NetBSD using the same libc that NetBSD uses?
looking at the netbsd code, nl_langinfo() has been supported since
relatively forever, but CODESET is a newer addition. given these
days, CODESET should appear in netbsd 1.6.
[ .. ]
1.1 (jtc 21-Jun-94): char *
1.1 (jtc 21-Jun-94): nl_langinfo(item)
1.1 (jtc 21-Jun-94): nl_item item;
[ .. ]
1.7 (tshiozak 26-Mar-01): case CODESET:
1.8 (tshiozak 17-Mar-02): s = _CurrentRuneLocale->rl_codeset;
1.7 (tshiozak 26-Mar-01): if (!s)
1.7 (tshiozak 26-Mar-01): s = "";
i don't know anything about freebsd for this.