Function cssparser::stylesheet_encoding [] [src]

pub fn stylesheet_encoding<E>(
    css: &[u8],
    protocol_encoding_label: Option<&[u8]>,
    environment_encoding: Option<E::Encoding>
) -> E::Encoding where
    E: EncodingSupport

Determine the character encoding of a CSS stylesheet.

This is based on the presence of a BOM (Byte Order Mark), an @charset rule, and encoding meta-information.

Returns the encoding to use.