Glenn & Roland, The C99 Standard (Subclause 7.11.2.1 "The localeconv function") says that the character string pointed to by char *decimal_point and char *thousands_sep in struct lconv contain "The decimal-point character used to format nonmonetary quantities." and "The character used to separate groups of digits before the decimal-point character in formatted nonmonetary quantities.", respectively. Note that in the C Standard, "character" is a single-byte character. Corresponding to this, the POSIX standard in the description of Locale Definition file (XBD Subclause 7.3.4 "LC_NUMERIC", P146, L4948-4949 & L4952-4954) we have: "In contexts where standards limit the decimal_point to a single byte, the result of specifying a multi-byte operand shall be unspecified." and "In contexts where standards limit the thousands_sep to a single byte, the result of specifying a multi-byte operand shall be unspecified." So, in general, struct lconv char* elements are strings which may contain zero or more characters before the terminating null, but the decimal_point and thousands_sep fields aren't quite as free.
Cheers, Don >Date: Mon, 14 Jan 2008 22:00:36 -0500 >From: Glenn Fowler <gsf at research.att.com> > >ast uses localeconv(3) >but >it assumes the struct lconv char* elements point to one byte >we will recode to properly treat the return as 0-terminated strings > >it will be up to the native localeconv() implementation >to do the right thing > >I just checked on sol11 and for LC_ALL=ar_SA.UTF-8 >struct lconv decimal_point = "," > >-- Glenn Fowler -- AT&T Research, Florham Park NJ --