| Previous | Next |
| STATUS_ILLEGAL_CHARACTER | STATUS_UNDEFINED_CHARACTER |
STATUS_UNMAPPABLE_CHARACTER
The input may be valid Unicode; the target encoding simply has no mapping
STATUS_UNMAPPABLE_CHARACTER is a conversion problem, not necessarily corrupt input. The status identifies a Unicode character for which no mapping exists in the target multibyte code page. A character can be valid in UTF-16 and still be absent from a legacy ANSI or OEM repertoire.
WideCharToMultiByte maps UTF-16 text to a selected code page and supports reporting use of a default character for code pages where substitution is applicable. Depending on flags and code page, an application can reject invalid input or allow replacement. If exact round-trip fidelity matters, silently accepting a best-fit or default-character substitution can be a data-integrity bug even when the API reports success.
Capture the Unicode scalar value, target code page, conversion flags, and whether a default character was used. The robust fix is often to keep data in Unicode or use UTF-8 at an interchange boundary, but only when the surrounding protocol and storage format support it. Deleting the character or transliterating it without a defined policy changes the data.
What to inspect
- The exact Unicode code point or UTF-16 sequence that has no target mapping.
- Target code page, conversion flags, default-character settings, and whether best-fit substitution is allowed.
- Whether the destination format can be changed to Unicode/UTF-8 instead of forcing lossy legacy-code-page conversion.
References
- Microsoft: WideCharToMultiByte
- Unicode Technical Report #17: Character Encoding Model
- Microsoft Open Specifications: NTSTATUS values
Looking for a different code? Search another status or error code.
