Browse Source

* workaround for bug in GetThreadLocale on some W7, resolves #18574

git-svn-id: trunk@17331 -
florian 14 years ago
parent
commit
6b4f13c1d7
1 changed files with 2 additions and 0 deletions
  1. 2 0
      rtl/win/sysutils.pp

+ 2 - 0
rtl/win/sysutils.pp

@@ -824,6 +824,8 @@ var
   DefaultCustomLocaleID : LCID;   // typedef DWORD LCID;
   DefaultCustomLocaleID : LCID;   // typedef DWORD LCID;
   DefaultCustomLanguageID : Word; // typedef WORD LANGID;
   DefaultCustomLanguageID : Word; // typedef WORD LANGID;
 begin
 begin
+  /// workaround for Windows 7 bug, see bug report #18574
+  SetThreadLocale(GetUserDefaultLCID);
   InitInternationalGeneric;
   InitInternationalGeneric;
   old8087CW:=Get8087CW;
   old8087CW:=Get8087CW;
   SysLocale.MBCS:=GetSystemMetrics(SM_DBCSENABLED)<>0;
   SysLocale.MBCS:=GetSystemMetrics(SM_DBCSENABLED)<>0;