Closed Bug 189106 Opened 18 years ago Closed 18 years ago

Cannot delete helper apps which have special characters in the MIME type

Categories

(Core Graveyard :: File Handling, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.3beta

People

(Reporter: piers, Assigned: bzbarsky)

References

Details

(Keywords: intl)

Attachments

(1 file)

If you create a helper app with special characters in the MIME type (e.g. £, Æ,
Ω, ¶, ý), you then can't remove or edit it.
can reproduce on win98 build from jan 12
Steps to reproduce:
1. Open Prefs -> Hepler Applications;
2. Click "New Type";
3. As the MIME type, enter "£" (no quotes);*
4. Click OK;
5. Select the newly created entry.

* On a non-UK keyboard you can press Alt+0163 (on Win) to get "£"

Actual results: "Edit" and "Remove" buttons are disabled.

Expected: Buttons are enabled, and actions possible.
biesi has volunteered to debug this...
Assignee: bzbarsky → cbiesinger
OK. I know what's up here...  The problem is that GetResource() expects (and
demands) an ascii string.  We pass it some random stuff that XPConnect strips to
be 7-bit-clean and things break.  We need to fix that by using
GetUnicodeResource, basically (or fixing GetResource...) or we need to do
filtering of the content-type string prior to it getting into the
overrideHandler code.

This is enough of an edge case that I think fixing it by hacking the existing
rdf-munging code is silly; I'd rather implement a service for doing it like I
keep meaning to.... then that can encapsulate all the logic that is in oodles of
places right now.

Piers, even when I fix this bug, that won't let you delete the entries you
already have that are messed up.... the problem you have is that your
mimeTypes.rdf file already contains corrupted data.  Ths fix will be to not
allow such data into the datasource rather than to deal with its presence in
there.  If you don't want to just trash mimeTypes.rdf, let me know (e-mail or
irc) and I can help you delete the bogus entries.
Depends on: 190020
.
Assignee: cbiesinger → bzbarsky
*** Bug 190951 has been marked as a duplicate of this bug. ***
This is causing internationalization issues too, so we really need to fix this.
 Patch is a simple search/replace s/GetResource/GetUnicodeResource/ on the
override handler.
Flags: blocking1.3b?
Keywords: intl
OS: Windows 2000 → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.3beta
Attachment #112888 - Flags: superreview?(dmose)
Attachment #112888 - Flags: review?(timeless)
Attachment #112888 - Flags: review?(timeless) → review+
Comment on attachment 112888 [details] [diff] [review]
use GetUnicodeResource (note that the C++ use UTF8 already, so needs no changing)

sr=dmose
Attachment #112888 - Flags: superreview?(dmose) → superreview+
Comment on attachment 112888 [details] [diff] [review]
use GetUnicodeResource (note that the C++ use UTF8 already, so needs no changing)

Potentially serious intl problem.... very straightforward fix to just use the
unicode api...
Attachment #112888 - Flags: approval1.3b?
Comment on attachment 112888 [details] [diff] [review]
use GetUnicodeResource (note that the C++ use UTF8 already, so needs no changing)

a=asa (on behalf of drivers) for checkin to 1.3beta.
Attachment #112888 - Flags: approval1.3b? → approval1.3b+
fixed
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: blocking1.3b?
Resolution: --- → FIXED
*** Bug 137276 has been marked as a duplicate of this bug. ***
Verified in the Win32 2003-03-13-04 NB under Win XP .
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.