Character Encoding
To make it possible to quote reserved or otherwise problematic characters inside strings, CSS offers an unorthodox escaping scheme: a backslash (\) followed by one to six hexadecimal digits. For example, according to this scheme, the letter e may be encoded as “\65”, “\065”, or “\000065”. Alas, only the last syntax, “\000065”, will be unambiguous if the next character happens to be a valid hexadecimal digit; encoding “teak” as “t\65ak” would not work as expected, because the escape sequence would be interpreted as “\65A”, an Arabic sign in the Unicode character map.
To avoid this problem, the specification embraces an awkward compromise: A whitespace can follow an escape sequence and will be interpreted as a terminator, and then ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access