Re: setlocale warnings.
Note that a WARNING result is not a failure, its flagging information
about the test interface, there is a "grey area" here,
where the specification is thought to be unclear or existing
behavior may interpret it differently. In this case
existing UNIX systems return the empty string in this case,
and have done so going back to at least XPG3
It is being addressed in technical corrigendum #1 to
SUSv3 . I quote below from the unapproved draft
120 Change Number: XBD/TC1/D1/9 [XBD ERN 21]
121 On Page: 244 Line: 8586 Section: langinfo.h (CRNCYSTR)
122 Change from:
123 "Local currency symbol, preceded by '-' if the symbol
124 should appear before the value, '+' if the symbol should
125 appear after the value, or '.' if the symbol should replace
126 the radix character."
128 "Local currency symbol, preceded by '-' if the symbol
129 should appear before the value, '+' if the symbol should
130 appear after the value, or '.' if the symbol should replace
131 the radix character. If the local currency symbol is the
132 empty string implementations may return the empty string ("")."
134 The addition of the last sentence has been made to accomodate historic
135 practise. This is an application visible change. Implementations may
136 choose either behavior. Applications should allow for the empty string
137 to be returned.
On Jun 19, 2:12pm in "setlocale warnings.", Pavel Bushuk wrote:
> I'm not sure if it's the right mailing list, but I wonder if it's possible to get rid of such a warning?
> /tset/ANSI.os/locale/setlocale/T.setlocale 1 - 9, 17, 18 Warnings
> > description: nl_langinfo(CRNCYSTR) when LANG=C expected "" got "-"
> The point is that in "The Single UNIX® Specification, Version 2" it is said that meaning of CRNCYSTR is:
> 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
> There is nothing about returning an empty string. Is there any solutions or advices? Any help in at least understanding this appreciated.
> Thanks beforehand,
> Pavel Bushuk
> Software Engineer
> SOT Finnish Software Engineering Ltd.
> Kreutzwaldi 7-4, 10124 TALLINN, ESTONIA
> Phone: +372 641 9975
> Fax: +372 641 9876
To UNSUBSCRIBE, email to email@example.com
with subject of "unsubscribe". Trouble? Email firstname.lastname@example.org