What does NTSTATUS 0xC0150021 (STATUS_XML_ENCODING_MISMATCH) mean?

 
Previous Next
STATUS_ADVANCED_INSTALLER_FAILED STATUS_SXS_MANIFEST_TOO_BIG

STATUS_XML_ENCODING_MISMATCH

The declared character encoding and actual bytes disagree

XML processors use the byte-order mark, initial byte pattern, and encoding declaration to determine how bytes map to characters. A file saved as UTF-8 but declaring UTF-16, or saved in a legacy code page while declaring UTF-8, can fail before the side-by-side schema is evaluated.

Repair the serialization source, not just the visible text. Re-saving through an editor may add or remove a byte-order mark, normalize characters, or change the encoding while leaving the declaration unchanged.

What to inspect

  • Inspect the raw first bytes, byte-order mark, and the exact XML declaration.
  • Validate the file with an XML parser using the same bytes delivered to Windows.
  • Check build, packaging, signing, and transport steps for unintended transcoding.
  • After correcting encoding, revalidate the manifest schema and hashes because the byte content changed.

References


Looking for a different code? Search another status or error code.