πŸ”¨ cuneicode_encoding (In Progress)ΒΆ

Warning

πŸ”¨ This isn’t finished yet! Come check back by the next major or minor version update.

This encoding is only available if the configuration macro for ZTD_TEXT_USE_CUNEICODE is turned on.

This encoding is tied to the cuneicode library. The cuneicode library is a C library for validation, counting, and transcoding between a fixed set of encodings, with an additional plug for arbitrary encodings that can be added at run-time. This is in opposition to iconv, where additional encodings can only be added by-hand through recompiling the code or hooking specific system configuration points.

cuneicode has a variable number of encodings it can be compiled with to support. States are pre-constructed in the encoding itself and copied as necessary when encode_state or decode_states are being created to call the desired conversion functions. The user can inspect the output error parameter from the cuneicode_encoding constructor to know of failure, or not pass in the output error parameter and instead take one of a assert, thrown exception, or abort (preferred invocation in that order).