Closed Bug 131197 Opened 23 years ago Closed 23 years ago

need to implement nsIPluginTagInfo2::GetDocumentEncoding()

Categories

(Core Graveyard :: Java: OJI, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: adu, Assigned: adu)

Details

Attachments

(1 file, 1 obsolete file)

Java Plugin needs working nsIPluginTagInfo2::GetDocumentEncoding() to be able display non-ascii data passed as apple PARAMs
Attached patch suggested fix, v1 (obsolete) — Splinter Review
Here's implementation on GetDocumentEncoding. I've taken <mozilla_bin>/res/charsetalias.properties and compared it with http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html. I decided not to create separate file for encoding mapping and to hold it (at runtime) in static hashtable which gets created upon first call to GetDocumentEncoding() and lives as long as mozilla itself. Suggestions and criticism are welcome :-)
Keywords: patch, review
Comment on attachment 74951 [details] [diff] [review] suggested fix, v1 If the PL_strdup/ToNewUTF8String calls fail, you should return the appropriate error.
Return NS_ERROR_OUT_OF_MEMORY if failed to dup string
Attachment #74951 - Attachment is obsolete: true
Peter, Patrick, could you review latest patch, please?
Comment on attachment 75159 [details] [diff] [review] suggested fix, v2 r=peterl ...but is there not a service that does this convertion for us?
Attachment #75159 - Flags: review+
Comment on attachment 75159 [details] [diff] [review] suggested fix, v2 r=peterl ...but is there not a service that does this convertion for us?
Nope. Here we need conversion from our standard charset names to java's names, which are different. We only have a service which converts charset aliases to their standard names...
Comment on attachment 75159 [details] [diff] [review] suggested fix, v2 sr=beard
Attachment #75159 - Flags: superreview+
Comment on attachment 75159 [details] [diff] [review] suggested fix, v2 a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #75159 - Flags: approval+
patch in trunk, marking FIXED.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.0
Verified the patch.
Status: RESOLVED → VERIFIED
As roc just noticed, while "us-ascii" may be a common encoding, "us-acsii" is not.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: