Describes a failure to encode, decode, transcode, or count, for four core various reasons.
This does not cover specific failures, like if a sequence was overlong (e.g., UTF-8) or if an encode operation produced an uunpaired surrogate value (e.g. UTF-16).
The okay status; everything is fine.
Input contains ill-formed sequences. This means there were available units of input to read, but what was read resulted in an error.
Input contains incomplete sequences. This means that the input was exhausted, without finding an invalid sequence, and therefore more input may be required.
Depending on context, this may or may not be an error in your use case (e.g., reading part of an incomplete network buffer and waiting for more). See ztd::text::incomplete_handler as a way to aid with this use case.
Output cannot receive the successfully encoded or decoded sequence. This means that, while there were no invalid or incomplete sequences in the input, the output ran out of space to receive it.
Provide a bigger storage area or guarantee that it meets the minimum required size for potential output. This can be queried for an encoding by using ztd::text::max_code_points_v<the_encoding> for code points, and ztd::text::max_code_units_v<the_encoding> for code units.
- enumerator ok