W3C home > Mailing lists > Public > www-validator-css@w3.org > May 2008

Re: Problem with element selectors having unicode characters

From: Radu Coravu <radu_coravu@sync.ro>
Date: Thu, 29 May 2008 08:55:19 +0300
Message-ID: <483E4547.7050009@sync.ro>
To: Yves Lafon <ylafon@w3.org>
CC: www-validator-css@w3.org
Dear Yves,

Thank you for the answer.

 From what I understand from the link that you posted is that the 
[\200-\377] range is given as such because it represent the highest 
character number that current versions of Flex can deal with
and actually the range limit should be interpreted as "\4177777".
I'm attaching a CSS file UTF-8 encoded which contains a non-ASCII 
character (U+010D).
In your opinion is this CSS file valid or not? The w3c validator marks 
it as invalid.

Regards,
Radu

-- 
Radu Coravu 
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Yves Lafon wrote:
> On Mon, 26 May 2008, Radu Coravu wrote:
>
>> Hi,
>>
>> The CSSParser.jj file declares at line 417 NONASCII as 
>> ["\200"-"\377"] That does not comprise the whole UNICODE range.
>> It should be something like: ~["\000"-"\177"] This means all non-ASCII.
>> I attached 2 sample files. The CSS contains a Japanese character in a 
>> selector and is marked as invalid by you but a browser has no 
>> problems matching the CSS selector to the element name.
>> Any input on this one?
>
> http://www.w3.org/TR/CSS21/grammar.html#scanner
> Also:
> in 4.1.3:
> In CSS, identifiers (including element names, classes, and IDs in
>        selectors) can contain only the characters [a-z0-9] and ISO 10646
>        characters U+00A1 and higher, plus the hyphen (-) and the
>        underscore (_); they cannot start with a digit, or a hyphen
>        followed by a digit. Identifiers can also contain escaped
>        characters and any ISO 10646 character as a numeric code (see next
>        item). For instance, the identifier "B&W?" may be written as
>        "B\&W\?" or "B\26 W\3F".
>        Note that Unicode is code-by-code equivalent to ISO 10646 (see
>        [UNICODE] and [ISO10646]).
>
> So the validator tries to stick as much as possible to the definition 
> given by the spec.
> Cheers,
>




Received on Thursday, 29 May 2008 05:59:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:20 GMT