This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6492 - Validator could not handle multi-byte font name.
Summary: Validator could not handle multi-byte font name.
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: Parser (show other bugs)
Version: CSS Validator
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: http://hobbit.ddo.jp
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-29 12:05 UTC by Makoto Takahashi
Modified: 2009-02-16 16:52 UTC (History)
3 users (show)

See Also:


Attachments
Japnese version read CP932 page properly (148.61 KB, image/pjpeg)
2009-02-11 06:04 UTC, Makoto Takahashi
Details
Sample file of CSS of CP932(Shift_jis) (666 bytes, text/css)
2009-02-13 03:59 UTC, Makoto Takahashi
Details
Sample of CSS of UTF-8 (694 bytes, text/css)
2009-02-13 04:00 UTC, Makoto Takahashi
Details
Sample of CSS file of UTF-8 with BOM (523 bytes, text/plain)
2009-02-14 13:35 UTC, Makoto Takahashi
Details
Sample of CSS file of UTF-8 without BOM (520 bytes, text/css)
2009-02-14 13:36 UTC, Makoto Takahashi
Details

Description Makoto Takahashi 2009-01-29 12:05:38 UTC
Validator can not handle multi-byte font name.
Also we can not write multi byte character in comment also.
Comment 1 Olivier Thereaux 2009-01-29 12:39:08 UTC
I do see a bug in the display of the "validated" stylesheet but nothing along the lines of "can not handle" multi-byte font name. Could you give more details?
Comment 2 Makoto Takahashi 2009-02-04 15:37:46 UTC
I validate following web page by latest CSS-Validator.

http://hobbit.ddo.jp/ie.css.utf8

Result is as follows.

Value Error : font-family Parse Error "�­�³ �°ææ", serif} H2 {­�³ �°ææ", serif} DT {­�³ �°ææ", serif} body {­�³ �°ææ", serif} .min {­�³ �°ææ", serif} .cjk {­�³ ææ", serif} :link:hover, :visited:hover { background: #4040FA; color: #F0F8FF} .shdw {width: 100%; filter: Shadow(color=#C0C0C0, direction=135)} 

Contents of validated CSS file is as follows.

@charset "utf-8";
H1      { font-family:  "Times New Roman", Times, "lr o¾©", serif}
H2      { font-family:  "Times New Roman", Times, "lr o¾©", serif}
DT      { font-family:  "Times New Roman", Times, "lr o¾©", serif}
body    { font-family:  "Times New Roman", Times, "lr o¾©", serif}
.min    { font-family:  "lr o¾©", serif}
.cjk    { font-family:  "lr ¾©", serif}
:link:hover, :visited:hover { background:   #4040FA;
          color:        #F0F8FF}
.shdw   {width:         100%;
         filter:        Shadow(color=#C0C0C0, direction=135)}

If CSS Validator read the name of font that contains multi-byte characters, CSS Validator could not accept it, and abort.
Comment 3 Olivier Thereaux 2009-02-04 15:42:50 UTC
This leaves me confused. Neither the last stable release of the validator nor the development instance (using the cvs HEAD) behave in the way you describe.

http://qa-dev.w3.org:8001/css-validator/validator?uri=http%3A%2F%2Fhobbit.ddo.jp%2Fie.css.utf8

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fhobbit.ddo.jp%2Fie.css.utf8

Comment 4 Olivier Thereaux 2009-02-04 15:57:34 UTC
(In reply to comment #3)
> This leaves me confused. Neither the last stable release of the validator nor
> the development instance (using the cvs HEAD) behave in the way you describe.

Yves suggests that the difference in behavior might come from locale setup differences between your  system and the one on w3.org. AFAICT on the w3 servers the servlet is running on a system with the locale LANG=en_US.UTF-8 is enabled.
Comment 5 Makoto Takahashi 2009-02-08 12:49:39 UTC
I run CSS validator on Windows XP of Japanese version.
Do you mean that CSS Validator only run in English language environment?
Comment 6 Olivier Thereaux 2009-02-09 15:35:50 UTC
(In reply to comment #5)
> I run CSS validator on Windows XP of Japanese version.
> Do you mean that CSS Validator only run in English language environment?

Obviously, no.

It should work nicely whatever your system language is, but apparently your system (java install?) does not decode utf-8 encoded stylesheets in the same way as our (linux or MacOSX) test systems do.

Admittedly this is way beyond my knowledge of how java and environment/system interact. I am copying Yves in case he has more to say on the issue.
Comment 7 Makoto Takahashi 2009-02-11 06:04:31 UTC
Created attachment 626 [details]
Japnese version read CP932 page properly

 As screenshot attached, Japanese version of Java read CP932 page properly and convert that to utf-8 properly.
 Maybe CSS Validator do not specify input characterset explicitly.
Comment 8 Makoto Takahashi 2009-02-13 03:59:03 UTC
Created attachment 627 [details]
Sample file of CSS of CP932(Shift_jis)

This is sample file of CSS of CP932(Shift_jis).
Java of Japanese environment read this properly.
Comment 9 Makoto Takahashi 2009-02-13 04:00:29 UTC
Created attachment 628 [details]
Sample of CSS of UTF-8

This is sample of CSS of UTF-8.
Both English and Japnese JAVA cannot read this properly.
Comment 10 Yves Lafon 2009-02-13 23:21:06 UTC
The behaviour difference between two installation were almost probably due to the default charset of the java installation.
The recent patches made should work for charset definition sent with the Content-Type header, or the BOM if present in UTF-8 streams, next step is obviously to switch charsets based on the @charset rule.

http://qa-dev.w3.org:8001/css-validator/validator?uri=http%3A%2F%2Fhobbit.ddo.jp%2Fie.css.utf8

should be displayed properly now.
(bug not closed, as it is pending @charset full support)
Comment 11 Yves Lafon 2009-02-14 09:18:39 UTC
Should work now with @charset even if no charset was defined using in the Content-Type HTTP header.
See http://qa-dev.w3.org:8001/css-validator/validator?uri=http%3A%2F%2Fwww.w3.org%2FBugs%2FPublic%2Fattachment.cgi%3Fid%3D627&profile=css21&usermedium=all&warning=1
Comment 12 Makoto Takahashi 2009-02-14 13:35:29 UTC
Created attachment 629 [details]
Sample of CSS file of UTF-8 with BOM

"By Upload", attached file is not read properly.
Comment 13 Makoto Takahashi 2009-02-14 13:36:35 UTC
Created attachment 630 [details]
Sample of CSS file of UTF-8 without BOM

"By Upload", attached file could not be read properly.
Comment 14 Yves Lafon 2009-02-16 08:16:50 UTC
It should work properly now with text input and file upload.
Comment 15 Makoto Takahashi 2009-02-16 15:21:47 UTC
Confirmed in Japanese language environment also.
Comment 16 Yves Lafon 2009-02-16 16:52:45 UTC
last fix done for no charset declaration and BOM in uploaded file.
Closing now, thank you for all the tests !