mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:19:13 +02:00
Patch from 20405 improves utf-8 TStringList
git-svn-id: trunk@32703 -
This commit is contained in:
parent
a8e589df12
commit
772cc519c5
@ -5,7 +5,7 @@ unit lazutf8classes;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, fileutil;
|
Classes, SysUtils, fileutil, lclproc;
|
||||||
|
|
||||||
type
|
type
|
||||||
TFileStreamUTF8 = class(THandleStream)
|
TFileStreamUTF8 = class(THandleStream)
|
||||||
@ -77,7 +77,10 @@ end;
|
|||||||
|
|
||||||
function TStringListUTF8.DoCompareText(const s1, s2: string): PtrInt;
|
function TStringListUTF8.DoCompareText(const s1, s2: string): PtrInt;
|
||||||
begin
|
begin
|
||||||
Result := CompareText(s1, s2);
|
if CaseSensitive then
|
||||||
|
Result:= UTF8CompareStr(s1,s2)
|
||||||
|
else
|
||||||
|
Result:= UTF8CompareText(s1,s2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TStringListUTF8.LoadFromFile(const FileName: string);
|
procedure TStringListUTF8.LoadFromFile(const FileName: string);
|
||||||
|
Loading…
Reference in New Issue
Block a user