mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:49:30 +02:00
lazutils: UTF8BOMToUTF8: sanity check
git-svn-id: branches/fixes_2_0@64701 -
This commit is contained in:
parent
db0a540042
commit
73f2bb4cf6
@ -5238,7 +5238,11 @@ const
|
||||
|
||||
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