mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 04:09:20 +02:00
* corrected initialization of cached information about 'MS Windows-compatible' codepage number information (if different from the OS/2 codepage number), removed warnings about implicit string conversions
git-svn-id: trunk@30016 -
This commit is contained in:
parent
56eeabd01b
commit
f71007d95c
@ -752,7 +752,8 @@ begin
|
||||
DefCpRec.OS2CP := CPArr [0];
|
||||
(* Find out WinCP _without_ considering RtlUsesWinCP *)
|
||||
I := 1;
|
||||
while (I <= MaxNonEqualCPMapping) and (CpXList [I].OS2CP <> OS2CP) do
|
||||
while (I <= MaxNonEqualCPMapping) and (CpXList [I].OS2CP <> DefCpRec.OS2CP)
|
||||
do
|
||||
Inc (I);
|
||||
if CpXList [I].OS2CP = CPArr [0] then
|
||||
DefCpRec.WinCP := CpXList [I].WinCP
|
||||
@ -1321,8 +1322,7 @@ begin
|
||||
character.
|
||||
*)
|
||||
if UniAPI then
|
||||
Result := OS2LowerUnicodeString (S)
|
||||
{ Two implicit conversions... ;-) }
|
||||
Result := AnsiString (OS2LowerUnicodeString (UnicodeString (S)))
|
||||
else
|
||||
begin
|
||||
Result := S;
|
||||
@ -1356,7 +1356,7 @@ var
|
||||
I, MaxLen: PtrUInt;
|
||||
begin
|
||||
if UniAPI then
|
||||
Result := OS2CompareUnicodeString (S1, S2) (* implicit conversions *)
|
||||
Result := OS2CompareUnicodeString (UnicodeString (S1), UnicodeString (S2))
|
||||
else
|
||||
(* Older OS/2 versions without Unicode support do not provide direct means *)
|
||||
(* for case sensitive and codepage and language-aware string comparison. *)
|
||||
@ -1425,8 +1425,8 @@ begin
|
||||
HSA2 := AnsiString (S2);
|
||||
if UniApi then
|
||||
begin
|
||||
HSU1 := HSA1; (* implicit conversion *)
|
||||
HSU2 := HSA2; (* implicit conversion *)
|
||||
HSU1 := UnicodeString (HSA1);
|
||||
HSU2 := UnicodeString (HSA2);
|
||||
Result := Sys_UniStrColl (DefLocObj, PWideChar (HSU1), PWideChar (HSU2));
|
||||
if Result < -1 then
|
||||
Result := -1
|
||||
@ -1444,7 +1444,8 @@ var
|
||||
I: PtrUInt;
|
||||
begin
|
||||
if UniAPI then
|
||||
Result := OS2CompareTextUnicodeString (S1, S2) (* implicit conversions *)
|
||||
Result := OS2CompareTextUnicodeString (UnicodeString (S1),
|
||||
UnicodeString (S2))
|
||||
else
|
||||
begin
|
||||
(* Let's use collation strings here as a fallback *)
|
||||
|
Loading…
Reference in New Issue
Block a user