Closed
Bug 143556
Opened 23 years ago
Closed 22 years ago
JavaScript escape/unescape doesn't work properly with surrogate characters
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.2beta
People
(Reporter: amyy, Assigned: shanjian)
References
Details
(Keywords: intl, topembed)
Build: 05-09 1.0.0 branch build.
Go to: http://babel/JavaScript_i18n/SimpChinese/escape_UTF8.html
Notice the last surrogate character is displayed as "??" - I expected it will
show the original character. Not sure if caused by escape() or unescape().
If you view the page source, the original charcter is diplayed correctly before
escaped.
Reporter | ||
Comment 1•23 years ago
|
||
Change component to Java Engine for now.
Comment 3•22 years ago
|
||
mark it as nsbeta1+ for m1.2final. tm=m1.2beta
Keywords: nsbeta1+
Target Milestone: --- → mozilla1.2beta
Assignee | ||
Comment 4•22 years ago
|
||
There is a mistake in the testcase.
y1="unescaped%E4%B8%AD%E9%97%B4%E6%9C%89%20%E7%A9%BA%E7%99%BDsurrogate%F0%90%80%84"
should be
y1="unescaped%E4%B8%AD%E9%97%B4%E6%9C%89%20%E7%A9%BA%E7%99%BDsurrogate%F0%A0%80%84"
Once I correct this, everything works fine.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Comment 5•22 years ago
|
||
I don't see the difference between the wrong one and correct on in previous
comment. What's it?
Comment 6•22 years ago
|
||
9 or 10 characters from the right you'll see a '9' on top line and an 'A' on the
bottom line
Reporter | ||
Comment 7•22 years ago
|
||
Thanks! I have correct my test case.
Then is the problem should be escape() the surrogate characters? although
unescape() seems doesn't has a problem?
Assignee | ||
Comment 8•22 years ago
|
||
I could not see anything wrong with my local build. I talked to ylong about this
bug. It sounds like some other problem caused the wrong escape output. I guess
it is the utf8 conversion, which has been fixed in my local tree. I will keep
this open until I check in my other surrogate fixes.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee | ||
Updated•22 years ago
|
Status: REOPENED → ASSIGNED
Assignee | ||
Comment 9•22 years ago
|
||
utf8 converting problem fixed. mark this one as fixed. Please verify.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Comment 10•22 years ago
|
||
batch: adding topembed per Gecko2 document
http://rocknroll.mcom.com/users/marek/publish/Gecko/Gecko2Tasks.html
Keywords: topembed
Reporter | ||
Comment 11•22 years ago
|
||
Still see the surrogate character is not escaped correctly ( %F0%90%80%84
instead of %F0%A0%80%84) on 09-12 trunk build / WinXP-SC.
Re-open.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 12•22 years ago
|
||
I tried it on 2002100409 build, and it works fine now. I guess one of the UTF8
is still not checked in when I close this bug.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•