Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Culture/Locale broken on Win XP?

Moderators: kris

Posted: 08/10/08 11:05:43 Modified: 08/10/08 11:22:31

This simple example

module culture;

import tango.io.Stdout, tango.text.locale.Core;

void main() {
    Culture culture = new Culture("de-DE");
    Stdout.formatln("englishName: {}", culture.englishName);
    Stdout.formatln("nativeName: {}", culture.nativeName);
}

compiles with tangobos 0.99.7, but throws "tango.core.Exception.LocaleException?: Culture not found - if this was not tried set by the application, Tango will expect that a locale is set for the system ."

The same goes for

...
private import tango.text.locale.Locale;
...
void main ()
{
        auto layout = new Locale;
...
}

Both examples used to work with Tango 0.99.6

By the way: MDCL.EXE (2008-04-27) of the current stable minid version throws this exception as well.

System: Tangobos 0.99.7 with dmd 1.033 - Windows XP Pro SP2

Could that be a Tango issue?

Author Message

Posted: 08/10/08 11:51:18

Hi HeiHon,

I believe there was a change, see [3538], that is relevant - could you try to revert that and see if you still get the same problem? I don't have a windows machine handy to test. In any case, please create a ticket?

Posted: 08/10/08 13:35:56

Thanks for the quick answer!

Sorry, I was wrong: Must be something on my Laptop (Win XP Pro SP2).

I did revert the change and got the same result. So I became curious and did:

1. Reinstall tango 0.99.6 on the Laptop - still the same.

2. Tried it again on my Desktop (Win XP Pro SP3): It worked with tango 0.99.7!

So I need some more investigation and I will try it on my Desktop at work on monday.

By the way: The exception is not thrown in Core.d (both versions), but in tango.text.locale.Data.d at line 374 (nice thing that the source code is included ;-)

Posted: 08/10/08 23:26:04

In the meantime I did some more testing:

Win XP SP3 - OK

Win XP SP2 - OK

Win 2000 - OK

The latter two running under vmware.

But my Laptop still throws - all other things seem to work.

Posted: 08/11/08 07:23:22

Maybe your laptop have a problem with the locale setup?