]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
locales: Fix eucJP sorting (broken upstream?)
authorbapt <bapt@FreeBSD.org>
Sun, 1 Nov 2015 21:02:30 +0000 (21:02 +0000)
committerbapt <bapt@FreeBSD.org>
Sun, 1 Nov 2015 21:02:30 +0000 (21:02 +0000)
commite29f1d2f891c995886c7e37be37546b3dfd29efd
treec7aed3cc395067010c10a944f955af1e97ba9646
parent8abd49c1b547efe6b06146384ace2ea07f277e16
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.

Triggered by: misc/freebsd-doc-ja in ports (encoded in eucJP)

Submitted by: marino
Obtained from: DragonflyBSD
lib/libc/locale/euc.c