Re: False Positive while checking @charset-tag

Yves Lafon <[email protected]> Fri, 27 Mar 2020 16:09:39 +0100
Newsgroups gmane.org.w3c.validator.css
Message-ID <[email protected]>

> On 27 Mar 2020, at 00:14, Technical Avatar <[email protected]> =
wrote:
>=20
> Hello!
>=20
> I use jigsaw to check my css.
> (https://jigsaw.w3.org/css-validator/)
>=20
> When I offer the css-file it occurs:
>=20
> Ergebnisse des CSS-Validators gk1010202.css (CSS level 3 + SVG)
>=20
> Ups! Es wurden die folgenden Fehler gefunden (1)
>=20
> URI : gk1010202.css
>=20
> 1 Die Regel @charset darf nur zu Beginn eines Stylesheets verwendet
> werden. Bitte =C3=BCberpr=C3=BCfen Sie, dass keine Leerzeichen davor =
zu finden
> sind. @charset "UTF-8";
>=20
> When I use "per Direkteingabe" and type in (correction: I use copy and
> paste to avoid spaces++!):
>=20
> @charset "UTF-8";
>=20
> It's okay!
>=20
> The file with the error has definetely no space infront the =
characters.
> My editor shows that it is the first character in the first line of =
the
> file.
>=20
> When I use to check it by URI
>=20
> https://www.g-kauft.de/cas/gk1.css
>=20
> the same error occured (Die Regel @charset darf nur zu Beginn eines
> Stylesheets verwendet werden. Bitte =C3=BCberpr=C3=BCfen Sie, dass =
keine
> Leerzeichen davor zu finden sind. @charset "utf-8";)
>=20
> The different (capital) characters "uft-8" vs "UTF-8" can be the =
problem.
> But if this is the case the error-text of the validator is wrong.
>=20
> So I'm of the oppinion that there is something wrong with the service.

Can you check that you don=E2=80=99t have a BOM at the beginning of your =
file?
It looks like it is related to the change introduced when fixing =
https://github.com/w3c/css-validator/issues/249
which is exactly that, a BOM at the beginning of the file is not valid, =
and it was wrongfully marked as valid by the validator a few weeks ago.
HTH,

--=20
Baroula que barouleras, au ti=C3=A9u toujou t'entourneras.

        ~~Yves