mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 15:10:03 +02:00
* hook up CompareUnicodeStringProc and CompareTextUnicodeStringProc in
cwstring (fixes webtbs/tw17591.pp on unix platforms) * enhanced webtbs/tw17591.pp so it also (superficially) checks the correctness of the called routines, and add cwstring for unix platforms git-svn-id: trunk@16298 -
This commit is contained in:
parent
5c92c18bdf
commit
c4488f6b3a
@ -771,13 +771,13 @@ begin
|
|||||||
StrUpperAnsiStringProc:=@AnsiStrUpper;
|
StrUpperAnsiStringProc:=@AnsiStrUpper;
|
||||||
ThreadInitProc:=@InitThread;
|
ThreadInitProc:=@InitThread;
|
||||||
ThreadFiniProc:=@FiniThread;
|
ThreadFiniProc:=@FiniThread;
|
||||||
{$ifndef VER2_2}
|
|
||||||
{ Unicode }
|
{ Unicode }
|
||||||
Unicode2AnsiMoveProc:=@Wide2AnsiMove;
|
Unicode2AnsiMoveProc:=@Wide2AnsiMove;
|
||||||
Ansi2UnicodeMoveProc:=@Ansi2WideMove;
|
Ansi2UnicodeMoveProc:=@Ansi2WideMove;
|
||||||
UpperUnicodeStringProc:=@UpperWideString;
|
UpperUnicodeStringProc:=@UpperWideString;
|
||||||
LowerUnicodeStringProc:=@LowerWideString;
|
LowerUnicodeStringProc:=@LowerWideString;
|
||||||
{$endif VER2_2}
|
CompareUnicodeStringProc:=@CompareWideString;
|
||||||
|
CompareTextUnicodeStringProc:=@CompareTextWideString;
|
||||||
end;
|
end;
|
||||||
SetUnicodeStringManager(CWideStringManager);
|
SetUnicodeStringManager(CWideStringManager);
|
||||||
end;
|
end;
|
||||||
|
@ -2,13 +2,19 @@ program comparetext;
|
|||||||
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
|
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
|
||||||
{$ifdef mswindows}{$apptype console}{$endif}
|
{$ifdef mswindows}{$apptype console}{$endif}
|
||||||
uses
|
uses
|
||||||
sysutils{,msesysintf};
|
sysutils
|
||||||
|
{$ifdef unix}
|
||||||
|
,cwstring
|
||||||
|
{$endif}
|
||||||
|
;
|
||||||
var
|
var
|
||||||
int1: integer;
|
int1: integer;
|
||||||
ustr1,ustr2: unicodestring;
|
ustr1,ustr2: unicodestring;
|
||||||
begin
|
begin
|
||||||
ustr1:= 'A';
|
ustr1:= 'A';
|
||||||
ustr2:= 'a';
|
ustr2:= 'a';
|
||||||
writeln(unicodecomparestr(ustr1,ustr2));
|
if unicodecomparestr(ustr1,ustr2)=0 then
|
||||||
writeln(unicodecomparetext(ustr1,ustr2));
|
halt(1);
|
||||||
|
if unicodecomparetext(ustr1,ustr2)<>0 then
|
||||||
|
halt(2);
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user