Open Bug 384025 Opened 17 years ago Updated 2 years ago

mistakes in spacing mixed Chinese and English text

Categories

(Core :: Layout: Text and Fonts, defect)

1.8 Branch
PowerPC
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: miles, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

An issue rather than a bug. Mozilla frequently miscalculates lengths of
text when displaying Chinese text, especially mixed Chinese and English
text. Probably to do with rendering Unicode double-byte characters.

Reproducible: Always

Steps to Reproduce:
1. Take the Google search window as an example, copy and paste into
it [Chinese text of about 4 or 5 characters]
  (e.g. paste 三国演义 from here)

2. After that, type [some English]
  (e.g. type {single space + } 3 Kingdoms)

3. The characters appear with the wrong spacing, which means that some don't
appear at all. In the example I gave, the last 2 characters are hidden, and
only appear if you do space space.

4. Click and drag to select some of the text. Clicking the cursor puts you
2 or 3 characters to the left or the right of where you intended.

5. This happens in several editable text windows as well as the Google
search window.

It doesn't always happen -- I work with Trad and Simp Chinese characters.
It tends to happen with the more complicated input. It has happened for at
least the last year or two, so the last 5 or 6 Mozilla/Firefox realeases.
There are other bug reports about problems with spaces in Chinese text,
possibly related, but this one (in editable text boxes) seems a pretty
basic place to start fixing it.
Component: Search → Layout: Fonts and Text
Product: Firefox → Core
QA Contact: search → layout.fonts-and-text
Version: unspecified → 1.8 Branch
I have the same problem with Firefox on the Mac. It's been a problem since a long time ago, much before 2.0 came out, and it's still happening with 2.0.0.4. And this has nothing to do with extensions and themes because the same problem occurs even when Firefox is run under safe-mode.

I think it has something to do with Firefox confused about the width of certain Chinese characters. It happens every time when I try to enter certain characters, e.g. "你好吗", in any text input (e.g. Google search box), but not with some other characters. If you don't know how to type Chinese, you can just copy those characters and paste them to Google.  You'll see the cursor is not in the right place.  Then try to type some English letters.  Then things will get ugly.

This only happens with Firefox as far as I know. Safari doesn't have this problem.
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.