@charset

@charset declares the encoding of an external stylesheet. It must be the file's very first bytes (only a byte-order mark may precede it), in the exact form @charset "UTF-8";: one space, double quotes, a semicolon. It does nothing inside <style> or a style attribute.

components.css saved as UTF-8CSS
@charset "UTF-8";
.price::before { content: "€"; }

Browsers take the encoding from the first available source: a byte-order mark, the HTTP Content-Type charset, @charset, then UTF-8. Single quotes or a leading space silently invalidate the rule.