Windos 7에서 Delphi 응용 프로그램의 부호화 문제를 해결하다
1431 단어 Delphi
——
—— Control Panel
—— Change display language
—— Formats
—— Format Chinese (Simplified, PRC)
—— Location
—— China
—— Administrative
—— Language for non-Unicode programs Change system locale... Chinese (Simplified, PRC)
—— Restart
2,
http://hi.baidu.com/523399/blog/item/5d422c7ad8dc6be52e73b3af.html
Windows 7 ,Delphi 7 , 。 Delphi 7 , , Delphi 7 dfm unicode AnsiString , 936 , 1252。 Windows 7 Beta BUG ? system locale Chinese PRC, locale windows 1033, locale 1033 1252。Delphi 7 system locale locale, 。 locale, SetThreadLocale API 。 bpl Delphi IDE ,IDE , :
1
unit RTLFix;2
3
interface4
5
uses6
Windows;7
8
implementation9
10
initialization11
SetThreadLocale(LOCALE_SYSTEM_DEFAULT);12 end
.13
,initialization , 。
, SetThreadLocale(LOCALE_SYSTEM_DEFAULT), 。