|
@@ -309,7 +309,9 @@ function MultiByteToWideChar(CodePage:UINT; dwFlags:DWORD; lpMultiByteStr:PChar;
|
|
|
cdecl; external 'coredll' name 'MultiByteToWideChar';
|
|
|
function WideCharToMultiByte(CodePage:UINT; dwFlags:DWORD; lpWideCharStr:PWideChar; cchWideChar:longint; lpMultiByteStr:PChar;cchMultiByte:longint; lpDefaultChar:PChar; lpUsedDefaultChar:pointer):longint;
|
|
|
cdecl; external 'coredll' name 'WideCharToMultiByte';
|
|
|
-function GetACP:UINT; external 'coredll' name 'GetACP';
|
|
|
+function GetACP:UINT; cdecl; external 'coredll' name 'GetACP';
|
|
|
+function GetConsoleCP:UINT; cdecl; external 'coredll' name 'GetConsoleCP';
|
|
|
+function GetConsoleOutputCP:UINT; cdecl; external 'coredll' name 'GetConsoleOutputCP';
|
|
|
|
|
|
{ Returns number of characters stored to WideBuf, including null-terminator. }
|
|
|
function AnsiToWideBuf(AnsiBuf: PChar; AnsiBufLen: longint; WideBuf: PWideChar; WideBufLen: longint): longint;
|
|
@@ -1604,6 +1606,15 @@ begin
|
|
|
Result:=WinCEWideLower(s);
|
|
|
end;
|
|
|
|
|
|
+function WinCEGetStandardCodePage(const stdcp: TStandardCodePageEnum): TSystemCodePage;
|
|
|
+ begin
|
|
|
+ case stdcp of
|
|
|
+ scpAnsi: Result := GetACP;
|
|
|
+ scpConsoleInput: Result := GetConsoleCP;
|
|
|
+ scpConsoleOutput: Result := GetConsoleOutputCP;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+
|
|
|
{ there is a similiar procedure in sysutils which inits the fields which
|
|
|
are only relevant for the sysutils units }
|
|
|
procedure InitWinCEWidestrings;
|
|
@@ -1617,6 +1628,9 @@ procedure InitWinCEWidestrings;
|
|
|
widestringmanager.Ansi2UnicodeMoveProc:=@WinCEAnsi2UnicodeMove;
|
|
|
widestringmanager.UpperUnicodeStringProc:=@WinCEUnicodeUpper;
|
|
|
widestringmanager.LowerUnicodeStringProc:=@WinCEUnicodeLower;
|
|
|
+ { Codepage }
|
|
|
+ widestringmanager.GetStandardCodePageProc:=@WinCEGetStandardCodePage;
|
|
|
+
|
|
|
DefaultSystemCodePage:=GetACP;
|
|
|
DefaultUnicodeCodePage:=CP_UTF16;
|
|
|
end;
|