git: locales: Fix eucJP sorting (broken upstream?)

John Marino marino at crater.dragonflybsd.org
Sun Nov 1 13:00:49 PST 2015


commit 1b2528395788a50bc1f1b8784770de1df2202db6
Author: John Marino <draco at marino.st>
Date:   Sun Nov 1 21:47:23 2015 +0100

    locales: Fix eucJP sorting (broken upstream?)
    
    Sorting eucJP text with "sort" resulted in an illegal sequence while
    "gsort" worked.  This was traced back to mbrtowc handling which was
    broken for eucJP (probably eucCN, eucKR, and eucTW as well).  This
    small fix took hours to figure out.  The OR operation to build the
    wide character requires an unsigned character to work correctly.  The
    euc wcrtowc conversion is probably broken upstream in Illumos as well.
    
    Reported by:	bapt at FreeBSD.org
    Triggered by:	misc/freebsd-doc-ja in ports (encoded in eucJP)

Summary of changes:
 lib/libc/locale/euc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1b2528395788a50bc1f1b8784770de1df2202db6


-- 
DragonFly BSD source repository



More information about the Commits mailing list