diff --git a/docs/xml/lazutils/lazutf8.xml b/docs/xml/lazutils/lazutf8.xml index 4af7d03f87..e7042cbbc9 100644 --- a/docs/xml/lazutils/lazutf8.xml +++ b/docs/xml/lazutils/lazutf8.xml @@ -71,11 +71,10 @@ Otherwise it returns a number 2..4. It does not check for malicious codepoints like #$c0#$80, nor for non defined codepoints like #$f3#$a0#$87#$b9. Use UTF8CharacterLength to step through a string with a simple loop: -

while p^<>#0 do begin - inc(p,UTF8CharacterLength(p)); -end; - -

+
+while p^<>#0 do begin
+ inc(p,UTF8CharacterLength(p));
+end;
Even if p contains invalid UTF-8 it will run through the string without overflow.