mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 15:29:25 +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];
|
DefCpRec.OS2CP := CPArr [0];
|
||||||
(* Find out WinCP _without_ considering RtlUsesWinCP *)
|
(* Find out WinCP _without_ considering RtlUsesWinCP *)
|
||||||
I := 1;
|
I := 1;
|
||||||
while (I <= MaxNonEqualCPMapping) and (CpXList [I].OS2CP <> OS2CP) do
|
while (I <= MaxNonEqualCPMapping) and (CpXList [I].OS2CP <> DefCpRec.OS2CP)
|
||||||
|
do
|
||||||
Inc (I);
|
Inc (I);
|
||||||
if CpXList [I].OS2CP = CPArr [0] then
|
if CpXList [I].OS2CP = CPArr [0] then
|
||||||
DefCpRec.WinCP := CpXList [I].WinCP
|
DefCpRec.WinCP := CpXList [I].WinCP
|
||||||
@ -1321,8 +1322,7 @@ begin
|
|||||||
character.
|
character.
|
||||||
*)
|
*)
|
||||||
if UniAPI then
|
if UniAPI then
|
||||||
Result := OS2LowerUnicodeString (S)
|
Result := AnsiString (OS2LowerUnicodeString (UnicodeString (S)))
|
||||||
{ Two implicit conversions... ;-) }
|
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Result := S;
|
Result := S;
|
||||||
@ -1356,7 +1356,7 @@ var
|
|||||||
I, MaxLen: PtrUInt;
|
I, MaxLen: PtrUInt;
|
||||||
begin
|
begin
|
||||||
if UniAPI then
|
if UniAPI then
|
||||||
Result := OS2CompareUnicodeString (S1, S2) (* implicit conversions *)
|
Result := OS2CompareUnicodeString (UnicodeString (S1), UnicodeString (S2))
|
||||||
else
|
else
|
||||||
(* Older OS/2 versions without Unicode support do not provide direct means *)
|
(* Older OS/2 versions without Unicode support do not provide direct means *)
|
||||||
(* for case sensitive and codepage and language-aware string comparison. *)
|
(* for case sensitive and codepage and language-aware string comparison. *)
|
||||||
@ -1425,8 +1425,8 @@ begin
|
|||||||
HSA2 := AnsiString (S2);
|
HSA2 := AnsiString (S2);
|
||||||
if UniApi then
|
if UniApi then
|
||||||
begin
|
begin
|
||||||
HSU1 := HSA1; (* implicit conversion *)
|
HSU1 := UnicodeString (HSA1);
|
||||||
HSU2 := HSA2; (* implicit conversion *)
|
HSU2 := UnicodeString (HSA2);
|
||||||
Result := Sys_UniStrColl (DefLocObj, PWideChar (HSU1), PWideChar (HSU2));
|
Result := Sys_UniStrColl (DefLocObj, PWideChar (HSU1), PWideChar (HSU2));
|
||||||
if Result < -1 then
|
if Result < -1 then
|
||||||
Result := -1
|
Result := -1
|
||||||
@ -1444,7 +1444,8 @@ var
|
|||||||
I: PtrUInt;
|
I: PtrUInt;
|
||||||
begin
|
begin
|
||||||
if UniAPI then
|
if UniAPI then
|
||||||
Result := OS2CompareTextUnicodeString (S1, S2) (* implicit conversions *)
|
Result := OS2CompareTextUnicodeString (UnicodeString (S1),
|
||||||
|
UnicodeString (S2))
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
(* Let's use collation strings here as a fallback *)
|
(* Let's use collation strings here as a fallback *)
|
||||||
|
Loading…
Reference in New Issue
Block a user