mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 18:49:19 +02:00
Fix UnicodeSpacesToASCII, After "Replace()" p is already replaced. Old code could skip codepoints or iterate past end of string. Don't replace regular space #20 with itself (nop).
This commit is contained in:
parent
c9c3d54bf2
commit
042ddcfe20
@ -5455,7 +5455,7 @@ begin
|
|||||||
$2060, // zero width word joiner
|
$2060, // zero width word joiner
|
||||||
$FEFF // zero width no-break space
|
$FEFF // zero width no-break space
|
||||||
: Replace(CodepointLen,'');
|
: Replace(CodepointLen,'');
|
||||||
$0020, // space
|
// $0020, // space
|
||||||
$00A0, // non breakable space
|
$00A0, // non breakable space
|
||||||
$2000, // en quad, half wide space
|
$2000, // en quad, half wide space
|
||||||
$2002, // en space, half wide space
|
$2002, // en space, half wide space
|
||||||
@ -5472,8 +5472,8 @@ begin
|
|||||||
$2001, // em quad, wide space
|
$2001, // em quad, wide space
|
||||||
$2003 // em space, wide space
|
$2003 // em space, wide space
|
||||||
: Replace(CodepointLen,' ');
|
: Replace(CodepointLen,' ');
|
||||||
|
else inc(p,CodepointLen);
|
||||||
end;
|
end;
|
||||||
inc(p,CodepointLen);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
until false;
|
until false;
|
||||||
|
Loading…
Reference in New Issue
Block a user