[Overview][Types][Classes][Procedures and functions][Variables][Index] |
Returns -1 if OK, otherwise byte index of invalid UTF-8 codepoint.
Source position: lazutf8.pas line 133
function FindInvalidUTF8Character( |
p: PChar; |
Count: PtrInt; |
StopOnNonUTF8: Boolean = True |
):PtrInt; |
Remark: | Deprecated. Use FindInvalidUTF8Codepoint instead. |
It always stops on irregular codepoints. For example Codepoint 0 is normally encoded as #0, but it can also be encoded as #192#0. Because most software does not check this, it can be exploited and is a security risk. If StopOnNonUTF8 is False it will ignore undefined codes. For example #128. By default it stops on such codes.
Version 3.2 | Generated 2024-02-25 | Home |