mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-25 23:29:19 +02:00
lazutils: UTF8BOMToUTF8: sanity check
git-svn-id: trunk@64700 -
This commit is contained in:
parent
bacadab499
commit
efc5ef502b
@ -358,7 +358,11 @@ end;
|
||||
|
||||
function UTF8BOMToUTF8(const s: string): string;
|
||||
begin
|
||||
Result:=copy(s,4,length(s));
|
||||
if s='' then exit('');
|
||||
if CompareMem(@UTF8BOM[1],@s[1],length(UTF8BOM)) then
|
||||
Result:=copy(s,4,length(s))
|
||||
else
|
||||
Result:=s;
|
||||
end;
|
||||
|
||||
function ISO_8859_1ToUTF8(const s: string): string;
|
||||
|
Loading…
Reference in New Issue
Block a user