Closed Bug 66807 Opened 25 years ago Closed 25 years ago

bad xsl template generate encoding="UTF-16" for non UTF-16 page cause garbage is displayed

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: wallym, Assigned: nhottanscp)

References

()

Details

(Keywords: intl)

Attachments

(3 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.7) Gecko/20010109 BuildID: 2001010901 The frame on the right hand side of the URL above shows garbage. IE 5.5 and earlier show correctly along with Netscape 4.7x and earlier. Reproducible: Always Steps to Reproduce: Navigate to the above url. Actual Results: garbage is displayed on the right hand side Expected Results: it should show a response in english.
WFM using 2001012504 on W2k. Wally, could you try to reproduce this problem with a newer build? If the problem still occurs, a screenshot or a more accurate description of "garbage" would be helpful. Thanks for testing Mozilla!
I can confirm this bug with win2k build 2001012708
Status: UNCONFIRMED → NEW
Ever confirmed: true
OK, it seems that using WebWasher keeps this bug from occuring. Using no proxies, I can reproduce, too. I'll compare the pages with and w/o WebWasher and try to find the culprit.
Comparing the two pages with and w/o WebWasher show no relevant differences. The problem seems to be connected with character coding: At http://www.popularcategories.com/getxml.asp?keywords=pets (the frame that is garbage), I am using "Western (ISO-8859-1)". If I selected that coding in the menu again (it seems to be already selected), the page reloads and displays ok. Just reloading the page produces the garbage again.
testing the URL with linux 2001012621 causes a freeze. Last msg in console: xmlencoding detect- UTF-16 After that xfs jumps to 75% CPU and remained there, going nowhere. I let it hang for 5 minutes - then had to kill moz.
updating component
Assignee: asa → nhotta
Component: Browser-General → Internationalization
QA Contact: doronr → teruko
<?xml version="1.0" encoding="UTF-16"?> Encoding and actual content does not match. Reassign to ftang. I don't remember if the similar bug was marked as INVALID.
Assignee: nhotta → ftang
56626 is about HTML and this one is about xml. mark it as P2.
Status: NEW → ASSIGNED
Priority: -- → P2
to fix this, we need to add some code in htmlparser/src/nsParser.cpp 2190 if(count >0) { 2191 firstXbytes.Mid(oCharset,(encStart+1), count); 2192 oCharsetSource= kCharsetFromMetaTag; 2193 } to compare with "UTF-16" first. If it is equal to UTF-16, then we should ignore it.
I have changed the xsl file that is used to generate this HTML output. This viewing problem no longer occurs with Mozilla .7 build. I am downloading the latest build to verify. Wally
nhotta, can you help ?
Assignee: ftang → nhotta
Status: ASSIGNED → NEW
Summary: garbage is displayed → bad xsl template generate encoding="UTF-16" for non UTF-16 page cause garbage is displayed
Status: NEW → ASSIGNED
Keywords: intl
OS: Windows 2000 → All
Priority: P2 → P3
Hardware: Other → All
Target Milestone: --- → mozilla0.9
adding the tag <xsl:output method="html" /> to the xsl file removed the utf-16 encoding tag from the html output. This has resolved the display output. I noticed in the bugreports that there are other instances of this problem. You might want to send them this fix. Wally
Changed QA contact to andreasb@netscape.com.
QA Contact: teruko → andreasb
r=ftang
sr=erik
checked in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This seems to work now (build 20010418 Win98 and 20010423 linux). Teruko, can you check if this bug fix has any side effects? Changing QA contact to teruko for now.
QA Contact: andreasb → teruko
Veriifed as fixed in Mac build (4-20) also.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: