git: locales: Enforce US-ASCII encoding (limited to 7-bit)

John Marino marino at crater.dragonflybsd.org
Mon Nov 9 13:56:17 PST 2015


commit efb570f9639647f0a2cf312796b8f85b936b071a
Author: John Marino <draco at marino.st>
Date:   Mon Nov 9 22:50:27 2015 +0100

    locales: Enforce US-ASCII encoding (limited to 7-bit)
    
    The US-ASCII format was getting treated identically to POSIX.  It is
    supposed to throw an ILSEQ errno if a value of 0x80 or greater is
    encountered, so let's bring back the "ASCII" handling.
    
    While here, change nl_codeset to return US-ASCII only when the encoding
    really is "US-ASCII".  Before "C" and "POSIX" encoding returned this
    string, so now they return "POSIX".

Summary of changes:
 lib/libc/locale/Makefile.inc       |   2 +-
 lib/libc/locale/{gbk.c => ascii.c} | 207 ++++++++++++++++++-------------------
 lib/libc/locale/mblocal.h          |   1 +
 lib/libc/locale/nl_langinfo.c      |   2 +
 lib/libc/locale/setrunelocale.c    |   4 +-
 5 files changed, 108 insertions(+), 108 deletions(-)
 copy lib/libc/locale/{gbk.c => ascii.c} (52%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/efb570f9639647f0a2cf312796b8f85b936b071a


-- 
DragonFly BSD source repository



More information about the Commits mailing list