Closed Bug 425657 Opened 16 years ago Closed 16 years ago

Add-on metadata de-utf-8-ed in extensions.rdf

Categories

(Toolkit :: Add-ons Manager, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9

People

(Reporter: Pike, Assigned: mossop)

References

Details

(Keywords: regression)

Attachments

(2 files)

It seems that the meta data for the German dictionary is busted, see attached screen shot.

Robert says that the title is OK locally, so I wonder if this broke in the AMO update. It looks like the UTF-8 string for "Wörterbuch" got interpreted as ASCII or latin-1 at one point.
Oops, sorry.

Clearly a Toolkit EM bug.

In my profile, it's encoded correctly in extensions/de-DE@dictionaries.addons.mozilla.org/install.rdf, but brokenly in extensions.rdf.

So it's somewhere in the extension registration code.

This should block Firefox 3.
Severity: normal → blocker
Component: Dictionaries → Extension/Theme Manager
Flags: blocking-firefox3?
Keywords: regression
Product: addons.mozilla.org → Firefox
QA Contact: dictionaries → extension.manager
Yes, install.rdf is correct UTF8.

I'm also convinced this is a bug in trunk EM, not in AMO. While downloading and in the popup that asks for installation, the German text (coming from AMO) is correct, only once we read the install.rdf the title is shown as if we'd display/read the UTF8 as ISO-8859-1.

The same is true for the Belarusian dictionary (just to have a second testcase), and I'm also seeing this is SeaMonkey trunk (using the same toolkit EM).
Summary: German Wörterbuch metadata de-utf-8-ed → Add-on metadata de-utf-8-ed in extensions.rdf
I'll do some investigation to figure out what is going on here.
Assignee: nobody → dtownsend
This is a regression from bug 424107. We should block on this as it will mess up any extension information containing multi-byte characters. Have a unit test ready and the fix will be reasonably easy to implement, just deciding on the best course of action.
Blocks: 424107
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P2
Attached patch patch rev 1Splinter Review
This correctly handles character encodings in the install manifest. There are a few different ways to achieve this, none of them ideally suited to what we want (sychronous behaviour with the rdf not ending up in the datasource cache). The approach I have taken is to get a streamlistener from the rdf parser to push data to. Then simply call it repeatedly as long as there is data remaining in the file input stream.

Added in some exception handling which will show up as a malformed install.rdf and then returns no data.

The testcase install.rdf looks a little odd in the patch because it is saved with windows line endings which is something else I have heard is broken and wanted to test.
Attachment #312692 - Flags: review?(robert.bugzilla)
Status: NEW → ASSIGNED
Whiteboard: [has patch]
Whiteboard: [has patch] → [has patch][needs review rstrong]
Attachment #312692 - Flags: review?(robert.bugzilla) → review+
Whiteboard: [has patch][needs review rstrong] → [has patch]
Checking in toolkit/mozapps/extensions/src/nsExtensionManager.js.in;
/cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v  <--  nsExtensionManager.js.in
new revision: 1.285; previous revision: 1.284
done
RCS file: /cvsroot/mozilla/toolkit/mozapps/extensions/test/unit/test_bug425657.js,v
done
Checking in toolkit/mozapps/extensions/test/unit/test_bug425657.js;
/cvsroot/mozilla/toolkit/mozapps/extensions/test/unit/test_bug425657.js,v  <--  test_bug425657.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/toolkit/mozapps/extensions/test/unit/addons/test_bug425657/install.rdf,v
done
Checking in toolkit/mozapps/extensions/test/unit/addons/test_bug425657/install.rdf;
/cvsroot/mozilla/toolkit/mozapps/extensions/test/unit/addons/test_bug425657/install.rdf,v  <--  install.rdf
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has patch]
Target Milestone: --- → Firefox 3
Verified fix on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008050706 Minefield/3.0pre.  
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: