Closed
Bug 168737
Opened 23 years ago
Closed 23 years ago
[FIX]Syntax coloring not working for UTF-16 encoded pages.
Categories
(Core Graveyard :: View Source, defect, P1)
Core Graveyard
View Source
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.2beta
People
(Reporter: nikd, Assigned: bzbarsky)
References
()
Details
(Keywords: intl)
Attachments
(1 file)
393 bytes,
patch
|
caillon
:
review+
rbs
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
Load http://www.student.lu.se/~kin02ndo/ (and any of the links there), and then
view the source. The page syntax is all black rather than colored.
Might be the byte order mark messing up something.
(Neither does wrapping of long lines in the source work, but that seems to be a
separate bug pertaining to all encodings.)
Confirmed using FizzillaCFM/2002091014 on 10.1.5.
Reassigning to View Source and adding intl keyword.
(Niklas, FYI, you have a couple of HTML syntax errors at that URL, including a
misquoted anchor attribute value (missing trailing quote) and an extraneous </div>.)
Assignee: yokoyama → doron
Severity: trivial → normal
Status: UNCONFIRMED → NEW
Component: Internationalization → ViewSource
Ever confirmed: true
Keywords: intl
QA Contact: ruixu → pmac
Reporter | ||
Comment 2•23 years ago
|
||
Thanks. Damn W3C validator doesn't recognize UTF-16. Could that be a tech
evangelism bug?
![]() |
Assignee | |
Comment 3•23 years ago
|
||
![]() |
Assignee | |
Comment 4•23 years ago
|
||
caillon, could you review?
Assignee: doron → bzbarsky
OS: MacOS X → All
Priority: -- → P1
Hardware: Macintosh → All
Summary: Syntax coloring not working for UTF-16 encoded pages. → [FIX]Syntax coloring not working for UTF-16 encoded pages.
Target Milestone: --- → mozilla1.2beta
Comment 5•23 years ago
|
||
Comment on attachment 102425 [details] [diff] [review]
Stupid fix.
r=caillon
Attachment #102425 -
Flags: review+
Comment 6•23 years ago
|
||
shouldn't that be added after the licence block?
![]() |
Assignee | |
Comment 7•23 years ago
|
||
No, because that would be illegal CSS. The @charset rule must be the first
thing in the file; no comments, whitespace, whatever allowed before it.
If you think about it for 10 seconds, you should realize why that is (hint: how
do I parse the comment as a comment without knowing the encoding?)
Comment 8•23 years ago
|
||
>how do I parse the comment as a comment without knowing the encoding?
well... how do you parse the @charset without knowing the encoding? or should
that always be in US-ASCII?
![]() |
Assignee | |
Comment 9•23 years ago
|
||
You parse it by knowing that it's 7-bit-clean data possibly encoded in a 2 or 4
byte encoding. Why ask me? Just look it up --
http://lxr.mozilla.org/seamonkey/source/content/html/style/src/nsCSSLoader.cpp#611
The key is that it starts with a known useful string -- "@charset"
Comment 10•23 years ago
|
||
Comment on attachment 102425 [details] [diff] [review]
Stupid fix.
sr=rbs
Attachment #102425 -
Flags: superreview+
Comment 11•23 years ago
|
||
Comment on attachment 102425 [details] [diff] [review]
Stupid fix.
a=asa for checkin to 1.2beta (on behalf of drivers)
Attachment #102425 -
Flags: approval+
Comment 12•23 years ago
|
||
Just FYI, for those who care:
http://www.w3.org/TR/CSS2/syndata.html#q23
http://www.w3.org/TR/CSS21/syndata.html#q19
Fourth paragraph explains the @charset at-rule.
![]() |
Assignee | |
Comment 13•23 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•