Closed
Bug 125129
Opened 23 years ago
Closed 23 years ago
Status messages not being converted to UTF8
Categories
(Core Graveyard :: Java: OJI, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: bnesse, Assigned: bnesse)
References
()
Details
Attachments
(2 files, 1 obsolete file)
2.35 KB,
patch
|
sdagley
:
review+
beard
:
superreview+
|
Details | Diff | Splinter Review |
1019 bytes,
patch
|
sdagley
:
review+
beard
:
superreview+
|
Details | Diff | Splinter Review |
The MRJ plugin for OS9, and I expect OSX as well, is passing status messages
from the applet to the the plugin support code in the standard Mac character set
rather than converting them to UTF8 which is what the plugin expects to receive.
This is keeping us from displaying status text on any string not in the UTF8
bytecode range.
The applet referenced above should display a copyright notice string in the
status window. This is failing because the copyright symbol "©" has not been
converted to UTF8.
Assignee | ||
Comment 1•23 years ago
|
||
Although the code path is completely different on OSX, I see the same results...
the text does not show up in the status bar. OS -> All
Status: NEW → ASSIGNED
OS: Mac System 9.x → All
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Comment 2•23 years ago
|
||
This patch fixes the problem in the OS 9 plug-in.
Assignee | ||
Comment 3•23 years ago
|
||
Turns out that the OS X plug-in is trying to do the right thing. But the
destination buffer isn't large enough to handle the additional characters
inserted during the conversion to UTF-8 so it returns an empty buffer instead.
Assignee | ||
Comment 4•23 years ago
|
||
Patch which fixes the OS X plug-in. Also removes some dead code.
Comment 5•23 years ago
|
||
Comment on attachment 69332 [details] [diff] [review]
Proposed patch (OS X)
r=sdagley (* 2 is probably enough space but what the heck)
Attachment #69332 -
Flags: review+
Comment 6•23 years ago
|
||
Comment on attachment 69262 [details] [diff] [review]
proposed patch (OS 9 plug-in)
I was going to question the use of delete[] on the result of
::JMTextToEncoding() but I have to question the call itself as I can't find it
on a search of the Apple website and it's not in my JManager.h header. Am I
missing some update?
Assignee | ||
Comment 7•23 years ago
|
||
> (* 2 is probably enough space but what the heck)
To quote the voice from the other side of the wall when I said the same thing
"That is very Euro-centric thinking".
For the normal case, a couple of bytes would probably be fine. However in the
worst case secenario, a Unicode character will be converted into a 3 byte UTF-8
representation. (Technically, according to the doc, you could have up to a 6
byte UTF-8 representation... but this is really special case...)
>Am I missing some update?
JMTextToEncoding is actually a locally defined function:
http://lxr.mozilla.org/seamonkey/source/plugin/oji/MRJ/plugin/Source/MRJContext.cp#847
As to why it has :: in front of it you'd have to ask beard. I stole that code
from something he had written elsewhere. I will remove the :: for clarity.
Comment 8•23 years ago
|
||
Comment on attachment 69332 [details] [diff] [review]
Proposed patch (OS X)
sr=beard
Attachment #69332 -
Flags: superreview+
Comment 9•23 years ago
|
||
Comment on attachment 69262 [details] [diff] [review]
proposed patch (OS 9 plug-in)
r=sdagley (now that I understand the usage of JMTextToEncoding())
Attachment #69262 -
Flags: review+
Comment 10•23 years ago
|
||
Comment on attachment 69262 [details] [diff] [review]
proposed patch (OS 9 plug-in)
You should make sure |JMTextToEncoding()| isn't returning NULL.
Attachment #69262 -
Flags: needs-work+
Assignee | ||
Comment 11•23 years ago
|
||
Add null check for message before displaying and disposing.
Attachment #69262 -
Attachment is obsolete: true
Comment 12•23 years ago
|
||
Comment on attachment 69690 [details] [diff] [review]
Better OS9 patch
sr=beard
Attachment #69690 -
Flags: superreview+
Comment 13•23 years ago
|
||
Comment on attachment 69690 [details] [diff] [review]
Better OS9 patch
r=sdagley
Attachment #69690 -
Flags: review+
Comment 14•23 years ago
|
||
One prefixes calls to functions with :: when one is explicitly calling a
globally defined function, rather than another member function. It's a C++
style thing.
Assignee | ||
Comment 15•23 years ago
|
||
Both patches checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•