On Friday, 24 February 2012 at 18:47:34 UTC, Jonathan M Davis
On Friday, February 24, 2012 08:10:31 Frank De prins wrote:
When I use setlocale with LC_ALL it does not seem to work.
I use nlb_belgium and, when I print (writeln in console) a
floating point number, I expect the decimal separator to be a
comma. But it remains a dot.
When I use 0 instead of LC_ALL, it does work.
So I inspected the values defined for those locale cateory
constants and they seem to be completely different from what I
find in the Visual C++ headers. Is this possible? I mean, are
they not expected to be the same, or is this vendor specific?
PS: This is how they are defined in VC:
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5
Also, in VC++, the return value of setlocale is defined as
whereas, in D, it is int. This makes it impossible to inspect
the current locale.
Best regards and thanks for a wondderfull language,
This list is not intended to be posted to directly by anyone
itself. If you have a bug, please report it at
which case, that would be messaged to this list). If you have a
learning D, then post to digitalmars-d-learn, and if you have a
question then, post it to digitalmars-d.
- Jonathan M Davis
Already reported as issue 5589 some time ago.