Re: Problem with element selectors having unicode characters

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.


Radu Coravu 
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

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?
> 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 UTC