Skip to content
EPUBCheck · Stylesheets

CSS-003

Updated:

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; UTF-8 is recommended.

The official message

CSS 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

How to fix it

  • Re-save the file as UTF-8, and change any @charset rule to "UTF-8".

Terms used here

Other CSS messages

  • CSS-002 Empty or NULL reference found.
  • CSS-004 CSS documents must be encoded in UTF-8, detected …;
  • CSS-001 The "…" property must not be included in an EPUB Style Sheet.
  • CSS-006 CSS selector specifies fixed position.
  • CSS-007 Font-face reference "…" refers to non-standard font type "…".
  • CSS-008 An error occurred while parsing the CSS: ….

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.

FAQ

What does EPUBCheck CSS-003 mean?

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; UTF-8 is recommended.

Is CSS-003 an error?

CSS-003 is reported as warning by default. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.