git: nl_langinfo(CODESET): Again return "US-ASCII" for C/POSIX

John Marino marino at
Tue Nov 10 00:14:20 PST 2015

commit 0e78b6c5117674ec0e6b8dc732dea58b55857eea
Author: John Marino <draco at>
Date:   Tue Nov 10 09:09:15 2015 +0100

    nl_langinfo(CODESET): Again return "US-ASCII" for C/POSIX
    Reflecting that the "C"/"POSIX" locale has a different encoding (8-bit)
    than "US-ASCII" (7-bit) resulted in immediate fallout on ports,
    particularly on python.
    Looking at glibc, nl_langinfo returns "ANSI_X3.4-1968" for both "C" and
    "POSIX" locales, which is the Linux equivalent of US-ASCII.
    Despite it being impossible to distinguish between C/POSIX and US-ASCII
    with this change, it needs to be reverted for the sake of third-party
    software compatibility.  (Remember nl_langinfo has no standard)

Summary of changes:
 lib/libc/locale/nl_langinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

DragonFly BSD source repository

More information about the Commits mailing list