locale - Add two new API functions
* Add wcrtombin() and mbintowcr(), powerful buffer-to-buffer functions
to translate UTF8, which can also perform escaping and de-escaping,
allow legacy parsing, and do checks with varying levels of strictness.
NOTE: If no locale or "C" locale, these functions are 1:1 (do not do
UTF8 processing). A UTF8 locale must be used to access these
functions.
* Add wcrtoutf8() and utf8towcr(). These work exactly the same as
the above functions but are locale-agnostic. They always operate in
UTF8 and locale initialization is not necessary.
* Escaping and de-escaping for 8-bit-clean round-trips with two of the
modes.
* Can construct UTF8B from unescaped 8-bit-clean data, can deconstruct
UTF8B (restore the original clean data), and can also be flagged
generically to take already-escaped UTF8B or wchars as input.
* Can be used to perform strict checks.
* Very powerful incremental buffer validation and processing capabilities.
Far more visibility to the caller rather than hiding state in a tracking
state structure. No tracking state structure.
* Does not do idiotic nul buffer termination. Caller passes explicitly
sized data, can opt to include or not include a terminator (depending
on what is desired), and the byte buffers can contain any 8-bit code
including 0x00.
17 files changed: