RSC-027
Updated:
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.
The official message
XML document is encoded in UTF-16. It should be encoded in UTF-8 instead.
- Default severity
- Warning. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.
- EPUBCheck version
- 5.4.0
Typical causes
- A file saved in UTF-16 by an editor, common with some Windows tools.
How to fix it
- Re-save the file as UTF-8 and make its XML declaration say encoding="UTF-8".
Terms used here
Other RSC messages
RSC-026URL "…" leaks outside the container (it is not a valid-relative-ocf-URL-with-fragment string)RSC-028XML documents must be encoded in UTF-8, but … was detected.RSC-029Data URL is not allowed in this context.RSC-030File URLs are not allowed in EPUB, but found "…".RSC-031Remote resource references should use HTTPS, but found "…".RSC-032Fallback must be provided for foreign resources, but found none for resource "…" of type "…".
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.