#557880 libc6: nl_langinfo ALT_DIGITS and ERA not posix compliant

Package:
libc6
Source:
glibc
Description:
GNU C Library: Shared libraries
Submitter:
Kevin Ryde
Date:
2014-06-30 22:09:18 UTC
Severity:
normal
#557880#5
Date:
2009-11-24 23:04:42 UTC
From:
To:
With a ja_JP.UTF8 locale defined, the program foo.c below prints

    E3 80 87 00 E4 B8 80 00 E4 BA 8C 00

where I expected the 00 null bytes to be semi-colons, separating the
symbols for the alt digits, per POSIX

http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html#tag_07_03_05_02

which says

    The value consists of semicolon-separated symbols.

(Semi-colon is also the separator in the locale definition file, but
that's a separate thing.  That chapter of the spec has separate sections
for the file format and the subsequent C-language access.)

I believe the same problem is present in nl_langinfo(ERA).  The spec is
"Era description segments are separated by semicolons", but the libc
code ends up giving '\0' separators.