# EPUBCheck CSS-003: CSS file saved as UTF-16, how to fix it

Source: https://epubcc.com/epubcheck/css-003/ (updated 2026-11-04)

EPUBCheck CSS-003 is a warning message: “CSS document is encoded in UTF-16. It should be encoded in UTF-8 instead.” A CSS file is encoded in UTF-16, and UTF-8 is recommended. EPUB 3.3 allows UTF-8 or UTF-16 for stylesheets, so this is only a warning, but UTF-8 is the encoding every reading app handles.

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

## Typical causes

- A stylesheet saved in UTF-16 by an editor, often labelled "Unicode" in save dialogs.
- A @charset rule naming UTF-16 left from another project.

## How to fix it

1. Open the file EPUBCheck names (the message gives the path, line and column) in a text or EPUB editor such as Sigil, or unzip the EPUB and open it there.
2. Re-save the file as UTF-8.
3. Change any @charset rule at the top to @charset "UTF-8"; or remove it.
4. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

## When it's not this

If the file is in an encoding that is neither UTF-8 nor UTF-16, the error is CSS-004.

## Sources

- EPUB 3.3, §6.3.1.2 CSS requirements: https://www.w3.org/TR/epub-33/#sec-css-req (read 2026-11-04)

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