Closed Bug 19457 Opened 21 years ago Closed 21 years ago

Some title characters are missing when using non-ascii characters

Categories

(Core :: Internationalization, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: emk, Assigned: rickg)

References

()

Details

Attachments

(6 files)

Steps to reproduce:
1. Launch Mozilla.
2. Navigate to http://member.nifty.ne.jp/bakera/html/hatomaru.html
3. Look at the title bar.

Actual result:
See the screenshot (some characters are missing).

Expected result:
See the screenshot (using IE5).
IE5 and Nav4.7 works as expected.

I'm using [1999111808] build mozilla.exe on WinNT4 (SP5)
*Japanese* version.

This bug occurs because:
1. FindChar1() does not work correctly when fourth parameter (aChar)
   is a non-ascii character.
2. Sometimes CompressChars2() remove single whitespace immediately
   after the non-ascii character.
Attached patch Proposed patchSplinter Review
Assignee: ftang → rickg
reassign to rickg sicne the patch fix code in nsString
Status: NEW → ASSIGNED
Target Milestone: M12
I have fixes in my tree, but no way to test (for this case). I'll land them and
push the bug back to you to test.
Assignee: rickg → ftang
Status: ASSIGNED → NEW
Frank -- the changes have landed. Can you retest this?
Rick,  Why don't you mark it FIXED and let QA verify this?
Teruko, Will you try to regress this?
A space character between "部" and "☆" is still missing.
update the url
Assignee: ftang → rickg
rick, it seems your fix is not good enough. Somehow one space is missing. Mark
it FIXED if you believe you fix it and teruko, our QA, will verify it.
Assignee: rickg → ftang
Frank -- I think the bug in nsStr is fixed. There's no way for me to test this
based on the page you've provided. But if you'll provide a small test case
that's usable on a non-japanese platform I'll take another look.
Attached file non-DBCS testcase
One space between alpha and 'E' is missing.
I'm not sure this would also ocuur on U.S. version sice I have only DBCS
version.
Assignee: ftang → rickg
Rick, I think the problem is either in nsString or in the parser code.
The following test case which will reproduce the problem in your US  window-
<HTML>
<title>a &trade;&trade; E</html>
</HTM>

there should be a space between the 2nd [TM] and E.
Notice that you have to put down even number of &trade; to reproduce this
problem.
2,4,6,8 (or any even number) of &trade; will show you the problem. 1, 3, or 5 of
them won't show you the problem.
Status: NEW → ASSIGNED
Frank -- thanks for being patient. The bug was not in findchar1(). It was in
compresschars2() where the logic for non-ascii chars was reversed. Fixed in my
tree awaiting approval.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Fixed by update to compressChars2(). The logic for testing for valid ascii range
was reversed.
I verified this in 2000020110 M14 Win32 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.