GetThreadLocale returns different value than GetUserDefaultLCID?

前端 未结 5 707
迷失自我
迷失自我 2020-12-08 05:30

To get the locale settings, e.g. short date format, we\'ve always used GetLocaleFormatSettings with GetThreadLocale. This has always worked without problem until now.

<
5条回答
  •  余生分开走
    2020-12-08 06:13

    You're not the only one. I've seen this too with Windows 7 here in New Zealand and it seems to only trip up Delphi applications for some reason as far as I can tell.

    The strange thing we found is that switching to a different regional settings via Control Panel and then switching back to NZ resolves the issue. I'd be curious to know if the same workaround resolves it for you just to verify that we're seeing the same phenomenon.

    I'm wondering if selecting non-US regional settings via the Windows 7 install process is not quite 'doing the right thing' in some subtle way that only trips up Delphi applications for some reason.

    I'd arrived at similar test code to JP's in an attempt to track it down and find a software workaround but our QA guy had since found the 'regional settings switcheroo' workaround and he didn't fancy completely reinstalling Windows 7 again to get back to the original funky state for some reason :-)

提交回复
热议问题