[Overview][Procedures and functions][Index] |
Returns True if the specified values are a valid UTF-16 character (codepoint).
Source position: lazutf16.pas line 46
function IsUTF16CharValid( |
AChar: WideChar; |
ANextChar: WideChar |
):Boolean; |
AChar |
|
First UTF-16 code examined in the method. |
ANextChar |
|
Next UTF-16 code examined in the method. |
Returns False if AChar is #0 or AChar and ANextChar are unpaired surrogates.
Based on the specification defined by the Unicode consortium, at:
http://unicode.org/faq/utf_bom.html#utf16-7
Q: Are there any 16-bit values that are invalid?
A: Unpaired surrogates are invalid in UTFs. These include any value in the range D800 to DBFF not followed by a value in the range DC00 to DFFF, or any value in the range DC00 to DFFF not preceded by a value in the range D800 to DBFF. [AF]
If ANextChar is set to #0 there is no next character.
Version 3.2 | Generated 2024-02-25 | Home |