Closed
Bug 4431
Opened 26 years ago
Closed 26 years ago
XML must handle <?xml encoding=...?>
Categories
(Core :: XML, defect, P1)
Tracking
()
VERIFIED
FIXED
M10
People
(Reporter: rchen, Assigned: ftang)
References
Details
I tried to pseudo localize menu items in navigator.xul to Japanese by
putting encoding either "UTF-8", "ISO-10646-UCS-2" or "Shift_JIS" in text
declaration with menu items in encoded Japanese text. It failed and menu items
displayed in garbages with 3.18.99 M3 Windows build on Japanese NT 4.0.
Updated•26 years ago
|
Assignee: trudelle → saari
Target Milestone: M5
Comment 1•26 years ago
|
||
reassigned to saari as p3 for m5
Gerardo,
How did you do this? Did you use <META Content-Type ... charset= ...>?
By default XUL should use UTF-8. My understanding is that all our .xul files
used in 5.0 will be UTF-8 encoded. But you are correct, a XUL content developer
should be able to use other charset encodings.
Ignore my previous comments. Let me start again.
Ray (not Gerardo),
How did you do this? Did you use (XML syntax, not HTML syntax):
<?xml encoding='IANA-charset-name'?>
[Ray told me he did.]
2 things are required:
(1) By default, XML assumes the charset encoding is either UCS-16 or UTF-8
based upon the presence or not of a Byte-Order-Mark (BOM). If the data
is in UTF-8, we need to convert to UCS-16. (The UTF-8 to UCS-2 converter
is part of M4. Pre-5.0 Communicator has code to check for BOM.)
(2) For other charset encodings, we must be able to parse
<?xml encoding='IANA-charset-name'?>
and call the appropriate Unicode converter
Part (1) is needed for M4 and part (2) could wait for M5.
See reference: http://www.w3.org/TR/1998/REC-xml-19980210#charencoding
I have <?xml encoding='UTF-8'?> in the first line of my XUL file. I also have
Japanese text encoded in UTF-8 in menu items.
Assignee | ||
Comment 5•26 years ago
|
||
Add nisheeth to cc list since he own EXPAT integration. Saari, I have no idea why this bug assign to you. If you think you should not own this bug,
reassign this to nisheeth.
Updated•26 years ago
|
Assignee: saari → nisheeth
Comment 6•26 years ago
|
||
Reassigning to nisheeth
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Bug 4431 is not a duplicate of 4463.
4463 is for default encoding but 4431 is for general encoding. Currently if I
put Shift_JIS encoding with Shift JIS text, it crashes. I tested it with 4/26
build on Japanese NT 4.0.
Resolution: DUPLICATE → ---
Summary: XUL character encoding is not working. → XML must handle <?xml encoding=...?>
Target Milestone: M5
Suumarizing the new status of this bug:
The expat XML parser needs to parse
<?xml encoding=...?>
and then call the approprate charset converter
Updated•26 years ago
|
Status: REOPENED → ASSIGNED
Component: XUL → XML
Comment 10•26 years ago
|
||
Setting component to XML and milestone to M6...
Updated•26 years ago
|
Target Milestone: M6
Comment 11•26 years ago
|
||
Moving non-crasher XML bugs to M7...
Updated•26 years ago
|
Assignee: nisheeth → harishd
Status: ASSIGNED → NEW
Target Milestone: M7 → M8
Comment 12•26 years ago
|
||
I've spoken to Harish and Frank about this. We will implement this using the
observer mechanism we already have in place for META tags. Harish implemented
the META tag mechanism and is ready to extend that to include observation of XML
PIs. I'm re-assigning the bug to him and setting the milestone to M8...
Specifically, an observer will register an interest in the <?xml ?> PI and will
get notified by the parser when that PI is encountered. The observer can then
check for the encoding attribute and tell the webshell to reload the document
with a new charset, if necessary.
Comment 13•26 years ago
|
||
Have a fix but will not be checking in until M9. Need time for verification.
Setting to M9.
Comment 14•26 years ago
|
||
Do you need some test cases? IQA may be able to assist.
Status: NEW → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
Comment 15•26 years ago
|
||
Fix is in. Now, the observers can register for <?xml ?> PI and will
get notified by the parser when that PI is encountered.
Marking the bug fixed.
Comment 16•26 years ago
|
||
Ray, can you verify that this got fiexed for M9?
Assignee | ||
Comment 17•26 years ago
|
||
harishd, I though you didn't fix this and we decide to use another way to handle
this. Should we reopen this bug and assign it to me (ftang) ?
Assignee | ||
Updated•26 years ago
|
Status: RESOLVED → REOPENED
Assignee | ||
Updated•26 years ago
|
Resolution: FIXED → ---
Assignee | ||
Comment 18•26 years ago
|
||
reopen this bug and assign it to ftang.
Assignee | ||
Updated•26 years ago
|
Assignee: harishd → ftang
Status: REOPENED → NEW
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M9 → M10
Assignee | ||
Comment 19•26 years ago
|
||
mark this M10
Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 20•26 years ago
|
||
Add code into nsParser.cpp to detect BOM and also implement the Appendix F of
XML 1.0
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 21•25 years ago
|
||
Used files at babel/automation/xmlencoding/ to verify this fix
You need to log in
before you can comment on or make changes to this bug.
Description
•