My stylesheets contain CSS code similar to the following:
#nav > li::after {
content: " ➻";
}
You may notice that ➻ is not an ASCII character, and therefore it's "dangerous" to include it in a file without specifying a charset.
For now things have been smooth and I've never run into encoding issues with CSS stylesheets (mostly because user agents are getting better at guessing "UTF-8"), but I was wondering if there was a right way to explicitly specify it.
I've tried this:
<link rel="stylesheet" type="text/css; charset=UTF-8" href="foo.css"/>
But it doesn't seem to do anything, as I tried to specify a bogus encoding and it still displayed correctly.