aboutsummaryrefslogtreecommitdiff
path: root/utf.c
AgeCommit message (Collapse)Author
2022-01-01Remove dependency on signed integer representationMichael Forney
2021-10-20utf: Detect invalid codepointsMichael Forney
Also, make utf*enc assert that the codepoint is valid and return 0 for an invalid codepoint. This makes it possible to use safely without error checking. We intend that these functions will only be called with valid codepoints.
2021-10-20utf: Change argument orderMichael Forney
Also, make utf8dec take unsigned char * to avoid overflow when converting to signed char.
2021-08-20utf: Add missing return for invalid UTF-8Michael Forney
2021-08-15utf: Use C99 types for UTF-16/32 character instead of C11 char16_t/char32_tMichael Forney
Some operating systems do not support uchar.h, and glibc only defines char16_t/char32_t for GNU C compilers.
2021-07-06Add functions for encoding/decoding UTF-8/16Michael Forney
These will be needed to implement wide string literals.