Conversion from XIF to kTextMime is restricted to ISO-8859-1

VERIFIED FIXED in M13

Status

()

P3
normal
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: nhottanscp, Assigned: mikepinkerton)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

19 years ago
This is separated from 8427. This bug is about paste to other application (and
when kUnicodeMime is not available). I thought it would be simpler to create a
specific bug than adding comments to 8427 which has more issues involved.

As stated in 8427, ToNewCString is used when converting from XIF to kTextMime.
We have data loss in case of characters which are not in the range of
ISO-8859-1. We need to convert from unicode to the platform charset (ACP).
Possible fix is to use the stream version of content sink which takes charset.
Or hook up the unicode converter instead of calling ToNewCString (which I will
post the diff later).
(Reporter)

Comment 1

19 years ago
Created attachment 3388 [details] [diff] [review]
possible fix (using unicode converter), review needed
(Reporter)

Updated

19 years ago
Blocks: 8427
(Reporter)

Updated

19 years ago
Status: NEW → ASSIGNED
Target Milestone: M13
(Reporter)

Comment 2

19 years ago
Mike, Akkana, could you review the diff?
(Assignee)

Updated

19 years ago
Assignee: nhotta → pinkerton
Status: ASSIGNED → NEW
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
taking this bug, as i have fixes in my tree.
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
variation on nhotta's patch checked in.
(Assignee)

Updated

19 years ago
Status: RESOLVED → REOPENED
(Assignee)

Updated

19 years ago
Resolution: FIXED → ---
(Assignee)

Updated

19 years ago
Status: REOPENED → ASSIGNED
reopening per discussion with nhotta. my application of his proposed patch was
flawed and I want to continue investigating the use of the stream api's.
accepting
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → FIXED
ok, take two. i think i did it right this time ;)
(Reporter)

Comment 8

19 years ago
I tested this with Japanese and I was able to paste Japanese from mozilla to
simple text.
I used OS-9 with Japanese option installed. Since it's not localized to
Japanese, platform charset was MacRoman. So I had to change the source to hard
code the platform charset to Shift_JIS.
So for the verification, this needs to be tested on localized systems (e.g.,
Win98-J, MacOS9-J).

BTW, the other direction (copy from simple text to mozilla) doesn't seemed to be
working for non Latin1 (e.g. didn't work for MacRoman).
correct, since our charset conversion is done when we convert XIF to kTextMime.
Open a different bug, I guess.

Comment 10

19 years ago
Changed QA contact to nhotta@netscape.com.
QA Contact: teruko → nhotta
(Reporter)

Comment 11

19 years ago
Here is how to verify.
Win95/Win98 - Use Japanese localized system, copy Japanese text from mozilla and 
paste to notepad
Macintosh - Use Japanese localized system, copy Japanse text from mozilla and 
paste to simpletext
Unix - ask Xianlang
QA Contact: nhotta → teruko

Comment 12

19 years ago
I verified this in 2000020108 Win32 under Winnt 4.0J and Win95J.  

Comment 13

19 years ago
I verified this in 2000020408 Mac build.  I think Linux does not work, but we need more time to investigate this in Linux.
I mark this as verified.  After we find out the problem in Linux, we will open new bug.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.