[Overview][Types][Classes][Procedures and functions][Variables][Index] |
Finds the position where an invalid UTF-8 codepoint is found in the string.
Source position: lazutf8.pas line 132
function FindInvalidUTF8Codepoint( |
p: PChar; |
Count: PtrInt; |
StopOnNonUTF8: Boolean = True |
):PtrInt; |
p |
|
Values to examine in the function. |
Count |
|
Length of the input values. |
StopOnNonUTF8 |
|
True to exit on an malformed codepoint. |
Offset into the string for the error.
FindInvalidUTF8Codepoint is a PtrInt function used to find the position where an invalid UTF-8 codepoint is located in the specified value. The return value contains -1 when none of the values in p are invalid, or the zero-based offset into p where the invalid encoding was located.
StopOnNonUTF8 indicates if the function should exit when an encoded value is found that is not defined for the UTF-8 encoding, or for single byte characters inserted in the middle of a UTF-8 encoding (used in XSS attacks).
Version 3.2 | Generated 2024-02-25 | Home |