[Issue 18018] New: Locale not available when linking against snn.lib

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 28 18:05:24 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18018

          Issue ID: 18018
           Summary: Locale not available when linking against snn.lib
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: rumbu at rumbu.ro

auto p = setlocale(LC_NUMERIC, "de-DE");
    writeln(p ? fromStringz(p) : "FAILURE");
    auto lc = localeconv();
    writefln("Decimal separator: '%s'", *lc.decimal_point);
    writefln("Thousand separator: '%s'", *lc.thousands_sep);
    writefln("%f", 1234567.1234);

When using OMF format (linking against snn.lib) outputs:

FAILURE
Decimal separator: '.'
Thousand separator: ' '
1234567.123400

When using COFF format x86/64 (linking against Microsoft C Runtime) outputs:

de-DE
Decimal separator: ','
Thousand separator: '.'
1234567,123400

--


More information about the Digitalmars-d-bugs mailing list