Email List: Xaustin-review-lX
[All Lists]

Defect in XBD langinfo.h

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XBD langinfo.h
From: yyyyyy@xxxxxxxxxxxxx
Date: Tue, 19 Mar 2002 17:39:55 GMT
        Defect report from : Andrew Josey , The Open Group

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 244 line 8586 section langinfo.h comment {nl_langinfo_grey_area}

Problem:

Defect code :  3. Clarification required

Historically nl_langinfo(CRNCYSTR) when the language binding is C 
(or POSIX) has returned the value "" (an empty string) .  XPG3 said 
that CRNCYSTR was an empty string for the C locale (XPG3 Vol 3 
Page 60). This is existing behavior for many systems, and has
been  tested it this way for 13 years since XPG3, so based on 
existing behaiour this would appear to be intended.


The langinfo.h text describing CRNCYSTR states 

CRNCYSTR (LC_MONETARY)

Local currency symbol, preceded by    if the symbol
should appear before the value,  +  if the symbol should
appear after the value, or  .  if the symbol should replace
the radix character.

This takes into account ANSI C (later ISO C) which split parts of
the currency information into separate parts of the struct lconv.

A grey area appears to be in the definition when
there is no currency symbol. If there is none is there still
a requirement to return a -,+ or "." , and if so which one?

Existing behavior points to an empty string being returned
on most systems, but the specification is unclear.



Action:

Change from:

Local currency symbol, preceded by -   if the symbol
should appear before the value,  +  if the symbol should
appear after the value, or  .  if the symbol should replace
the radix character.

to:

Local currency symbol, preceded by -   if the symbol
should appear before the value,  +  if the symbol should
appear after the value, or  .  if the symbol should replace
the radix character.Otherwise if there is no currency symbol 
return the empty string ("").

<Prev in Thread] Current Thread [Next in Thread>
  • Defect in XBD langinfo.h, ajosey <=