# EPUBCheck RSC-027: XML file encoded in UTF-16, how to fix it

Source: https://epubcc.com/epubcheck/rsc-027/ (updated 2026-11-04)

EPUBCheck RSC-027 is a warning message: “XML document is encoded in UTF-16. It should be encoded in UTF-8 instead.” An XML file is encoded in UTF-16; EPUB recommends UTF-8 for every XML document. It is a warning: the file is still read, but some reading apps handle UTF-16 poorly.

- Official message (EPUBCheck 5.4.0): XML document is encoded in UTF-16. It should be encoded in UTF-8 instead.
- Default severity: Warning

## Typical causes

- A file saved in UTF-16 by an editor, common with some Windows tools that call it "Unicode".
- Files exported by an older word processor or script with UTF-16 as the default.

## How to fix it

1. Open the file named in the message in an editor that can change encodings.
2. Re-save it as UTF-8 and make its XML declaration say encoding="UTF-8".
3. Validate again.

## When it's not this

Any other non-UTF-8 encoding (ISO-8859-1, Windows-1252) is the error RSC-028.

## Sources

- EPUB 3.3, §3.9 XML conformance: https://www.w3.org/TR/epub-33/#sec-xml-constraints (read 2026-11-04)

Message text and severity: EPUBCheck (W3C, BSD-3-Clause). Explanation: EpubCC.
