Closed Bug 1008832 Opened 10 years ago Closed 10 years ago

Make the isInternal mode of nsIScriptableUConv more backwards compatible

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: hsivonen, Assigned: hsivonen)

References

Details

Attachments

(1 file, 1 obsolete file)

I intentionally didn't make this work with T.61-8bit (mixed-case canonical name), since I expect Thunderbird not to keep that one.
Attachment #8420836 - Flags: review?(VYV03354)
Blocks: 943268
Comment on attachment 8420836 [details] [diff] [review]
Try munging the label into something that works

We should not allow "replacement" as a valid label.
Attachment #8420836 - Flags: review?(VYV03354)
Actually, there are more email encoding alias in addition to ISO-2022-CN-EXT. Maybe the ISO-2022-CN-EXT hack here should go away and the API doc should just tell email callers to do their alias resolution using nsCharsetAlias first.
(In reply to Masatoshi Kimura [:emk] from comment #2)
> Comment on attachment 8420836 [details] [diff] [review]
> Try munging the label into something that works
> 
> We should not allow "replacement" as a valid label.

OK.
Attachment #8420836 - Attachment is obsolete: true
Attachment #8420857 - Flags: review?(VYV03354)
Blocks: 1006498
(In reply to Henri Sivonen (:hsivonen) from comment #3)
> Actually, there are more email encoding alias in addition to
> ISO-2022-CN-EXT. Maybe the ISO-2022-CN-EXT hack here should go away and the
> API doc should just tell email callers to do their alias resolution using
> nsCharsetAlias first.

nsCharsetAlias is not scriptable (not even an XPCOM interface). Perhaps we should add a hook in nsScriptableUnicodeConverter::InitConverter() so that c-c can add their alias resolution?
If only C++ callers need those encodings, they can just use nsCharsetConverterManager directly.
(In reply to Masatoshi Kimura [:emk] from comment #5)
> (In reply to Henri Sivonen (:hsivonen) from comment #3)
> > Actually, there are more email encoding alias in addition to
> > ISO-2022-CN-EXT. Maybe the ISO-2022-CN-EXT hack here should go away and the
> > API doc should just tell email callers to do their alias resolution using
> > nsCharsetAlias first.
> 
> nsCharsetAlias is not scriptable (not even an XPCOM interface).

nsICharsetConverterManager::getCharsetAlias is scriptable. How about I point to that in the comment?

(From an email perspective, that one fails for UTF-7, because this stuff hasn't been designed right from the get-go... However, now that nsICharsetConverterManager is going to be c-c only, they could un-ban UTF-7 in that method.)

> Perhaps we
> should add a hook in nsScriptableUnicodeConverter::InitConverter() so that
> c-c can add their alias resolution?

Possibly, but I won't have the time to do that today and c-c is still closed due to being blocked on this. So I suggest we land this patch (with the comment pointing to nsICharsetConverterManager::getCharsetAlias) to unblock c-c on the worst issue and then let c-c devs add a pluggability point here as a follow up once their tree isn't totally burning anymore and they still consider a pluggability point necessary.
Comment on attachment 8420857 [details] [diff] [review]
Try munging the label into something that works, v2

OK, let's unburn c-c before further discussion.
Attachment #8420857 - Flags: review?(VYV03354) → review+
Thanks. Landed with a mention of nsICharsetConverterManager::getCharsetAlias() in the comment.
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff77189e55df
https://hg.mozilla.org/mozilla-central/rev/ff77189e55df
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: