- Documentation
- Reference manual
- Foreign Language Interface
- The Foreign Include File
- Analysing Terms via the Foreign Interface
- Wide-character versions
- PL_new_atom_wchars()
- PL_atom_wchars()
- PL_get_wchars()
- PL_put_wchars()
- PL_unify_wchars()
- PL_unify_wchars_diff()
- PL_utf8_code_point()
- PL_utf8_strlen()
- PL_wcwidth()
- PL_is_id_start()
- PL_is_id_continue()
- PL_is_uppercase()
- PL_is_decimal()
- PL_is_layout()
- PL_ctype_flags()
- PL_toupper()
- PL_tolower()
- PL_totitle()
- Wide-character versions
- Analysing Terms via the Foreign Interface
- The Foreign Include File
- Foreign Language Interface
- Packages
- Reference manual
Availability:C-language interface function
NULL, the input is a 0-terminated string:
the decoder never reads past the 0-byte. Returns the number of bytes
consumed, or -1 if the sequence is invalid. Only the shortest encoding
of a code point up to U+10FFFF is valid. An invalid sequence consumes
one byte and returns that byte in cp, except for a surrogate
(U+D800 ... U+DFFF), which consumes the sequence and returns U+FFFD.
This is the decoder Prolog uses for UTF-8 text, so foreign code using it
agrees with Prolog on, e.g., the number of characters in invalid UTF-8.
ASCII is decoded inline.