in Windows 7 sometimes GetThreadLocale returns wrong value, then DefaultFormatsettings are initialized incorrectly
Original Reporter info from Mantis: lacak @lacak.sk
-
Reporter name: LacaK
Original Reporter info from Mantis: lacak @lacak.sk
- Reporter name: LacaK
Description:
It is because calls to getlocaleinfo with argument GetThreadLocale is used to initialize DefaultFormatSettings (like .ShortDateFormat, .DateSeparator etc.)
Possible solutions:
- use GetUserDefaultLCID() or LOCALE_USER_DEFAULT instead of GetThreadLocale ?
or
- call SetThreadLocale(LOCALE_USER_DEFAULT); in InitInternational before 1st use of GetThreadLocale in sysutils.pp ?
Additional information:
http://qc.embarcadero.com/wc/qcmain.aspx?d=80189
Mantis conversion info:
- Mantis ID: 18574
- OS: Windows 7
- OS Build: Windows 7
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 17331 (#6b4f13c1)
- Monitored by: » Petr-K (Petr-K)