Closed
Bug 13524
Opened 25 years ago
Closed 25 years ago
[BETA] JS string object function does not work on Non-Ascii strings
Categories
(Core :: Layout, defect, P2)
Tracking
()
VERIFIED
FIXED
M13
People
(Reporter: teruko, Assigned: vidur)
References
()
Details
Above URL has String Object, CharAt(), indexOf(), lastIndexOf(), substring(), toLowerCase(), toUpperCase() for Latin2 and
Japanese Shift_jis and Euc test cases.
None of the test cases works.
Steps of reproduce
1. Go to the URL
2. Click on string_latin2.html
3. Click on string_sjis.html
4. Click on string_euc.html
Every test cases does not work.
Tested 9-09-99 Win32 build.
Reporter | ||
Updated•25 years ago
|
Priority: P3 → P2
QA Contact: cbegle → teruko
Reporter | ||
Updated•25 years ago
|
Summary: JS string object function does not work on No Ascii strings → JS string object function does not work on Non-Ascii strings
Updated•25 years ago
|
Assignee: mccabe → rogerl
Comment 1•25 years ago
|
||
Roger, can you find a home for this?
It's possible that the problem isn't with the functions, but with the document
encoding.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 2•25 years ago
|
||
Yurk! I need help with this - when I look at the html it's just a bunch of
statements that display pass/fail - how do I get a look at the actual JS code?
Reporter | ||
Comment 3•25 years ago
|
||
To look at the source code of string_sjis.html file,
view-source: http://babel/javascript_i18n/string/string_sjis.html
or from the Network neigborhood
\\babel\babel_docs\javascript_i18n\string\string_sjis.html
Updated•25 years ago
|
Assignee: rogerl → troy
Status: ASSIGNED → NEW
Component: Javascript Engine → Layout
Comment 4•25 years ago
|
||
This is not a JS engine bug. All of the string routines are being called with
the correct parameters and are returning the right results. Those results are
not being displayed correctly - because of various tags in the HTML. I don't
know nearly enough about HTML to say whether this should work or not. Except of
course that it runs find under 4.6 etc. I trimmed the HTML down and ended up
with this piece which displays just fine under 4.6 but not with the current
build (umm, three days old). It's possible that there are other bugs i trimmed
in the process.
<HTML>
<BODY>
<SCRIPT>
document.write("<PRE>");
document.write("More Stuff".bold(), "\n");
document.write("here's that stuff");
document.write("</PRE>");
</SCRIPT>
</BODY>
</HTML>
Note that when the line 'document.write("</PRE>");' is commented out, things
work ok. (Well, spot the weird 'Q' after the bolded text)
Known issue of document.write not working. I don't know if this is you or Peter
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 6•25 years ago
|
||
The document.write bug is 11141.
*** This bug has been marked as a duplicate of 11141 ***
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Reporter | ||
Comment 7•25 years ago
|
||
I tested this in 120108 build. Bug 11141 has been fixed, but this still failed. I need to reopen this.
Reporter | ||
Updated•25 years ago
|
Resolution: DUPLICATE → ---
Assignee | ||
Comment 8•25 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
Reporter | ||
Comment 9•25 years ago
|
||
String_sjis.html passed, but some garbage characters are displayed.
String_euc.html and String_latin2.html do not pass and garbage characters are displayed.
String_latin1.html does not pass in Communicator 4.7, either. I will check the test case.
Assignee | ||
Updated•25 years ago
|
Assignee: vidur → ftang
Status: ASSIGNED → NEW
Assignee | ||
Comment 10•25 years ago
|
||
I fixed a simple bug that was causing us to add extra characters to the end of
document.writes of unicode characters (patch attached). However, there's still
another bug that causes non-deterministic failures in the tests. I've seen the
tests fail or the scripts themselves not compile because of missing characters
in the SCRIPT element content. After looking at it for quite a while, I believe
that the character dropping is happening in the character buffer to unicode
conversion driven from the scanner. I believe the errant code is somewhere in
nsUnicodeDecodeHelper. Passing the bug on to ftang for further investigation.
The patch for the bug that I fixed in the HTMLContentSink is:
Index: nsHTMLDocument.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/document/src/nsHTMLDocument.cpp,v
retrieving revision 3.177
diff -c -r3.177 nsHTMLDocument.cpp
*** nsHTMLDocument.cpp 1999/12/09 07:18:38 3.177
--- nsHTMLDocument.cpp 1999/12/11 01:49:50
***************
*** 1835,1841 ****
JSString *jsstring = JS_ValueToString(cx, argv[index]);
if (nsnull != jsstring) {
! str.Append(JS_GetStringChars(jsstring));
}
}
--- 1835,1841 ----
JSString *jsstring = JS_ValueToString(cx, argv[index]);
if (nsnull != jsstring) {
! str.Append(JS_GetStringChars(jsstring), JS_GetStringLength(jsstring));
}
}
Assignee | ||
Comment 11•25 years ago
|
||
I'll try to get the patch in for M12. If not, then M13. Frank, feel free to
apply it to your tree if you don't want to see the extra characters.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Updated•25 years ago
|
Assignee: ftang → bobj
Status: ASSIGNED → NEW
Comment 12•25 years ago
|
||
bob, I can use some help here.
Comment 13•25 years ago
|
||
Teruko,
I assume this is not a dogfood candidate?
But it should be fixed for Beta, right?
Reporter | ||
Updated•25 years ago
|
Summary: JS string object function does not work on Non-Ascii strings → [BETA] JS string object function does not work on Non-Ascii strings
Reporter | ||
Comment 14•25 years ago
|
||
Added [BETA] in summary.
Comment 15•25 years ago
|
||
Vidur,
Will you be able to apply your patch in M13?
Comment 16•25 years ago
|
||
I saw rev-3.119 contains the fix mentioned here. So it's ready in.
Comment 17•25 years ago
|
||
vidur, You checked in your patch for Version 3.180. I'm reassigning it to you
and then will mark it FIXED. Please modify this bug if this is not the correct
thing to do. Thx.
Status: NEW → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 18•25 years ago
|
||
The suggested patch was already applied. See previous comment.
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 19•25 years ago
|
||
I verified this in 111008 Win32, 111208 Linux build.
I see some display problem in Latin2 page. I will investigate more the problem and I will log in new bug.
You need to log in
before you can comment on or make changes to this bug.
Description
•