Closed Bug 202883 Opened 23 years ago Closed 23 years ago

Line wrapping error in Korean text where a fullstop leads a line

Categories

(Core :: Internationalization, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 164759

People

(Reporter: isaachh, Assigned: smontagu)

References

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030401 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030401 In the attached testcase page which has been created on purpose, all DIV boxes have specified with of 560 pixel. The sentence of the first example is incorrectly wrapped to two lines, where the second line begins with a fullstop ('.'). Reproducible: Always Steps to Reproduce: 1. open the testcase page in Mozilla 2. See the result Actual Results: The second line of the first example begins with a fullstop. Expected Results: The sentence should be wrapped just before the character (다, U+B2E4) preceding the fullstop. When the fullstop is replaced with an exclamation mark or other punctuation mark, the browser shows the correct wrapping. This does not occur in English text, only but in Korean text.
Attached file Testcase —
*** Bug 202884 has been marked as a duplicate of this bug. ***
This may be a Korean variation of Bug 164759.
Confirm with 04-21 trunk build on WinXP.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file Test case 2 —
Another test case: Delete/add the single byte space in 1st and 3rd string in original test case has different result.
Please ignore the 3rd case in previous test case 2 - I copy/pasted the problem 1st string into 3rd string, I can see the problem in Composer, but when bring it in Browser window, the line wrap shows fine.
I think this and bug 164759 are identical For CJK linebreaking (break at any grapheme boundaries except where prohibited per JIS X 4501), JIS X 4501 is used, I believe. I put comma and right parenthesis in place of full stop and the result is the same for all three characters that belong to JIS X 4501 class 'a' (actually, in JIS X 4501, full stop is class 6 and comma and right parenthesis are class 2, but both classes behave indetically so that in Mozilla they're combined into class 'a'). (see http://lxr.mozilla.org/seamonkey/source/intl/lwbrk/src/jisx4501class.h and related files in the directory)
Exclamation mark(U+0021) is class 'a' as are U+0029, U+002C and U+002E ('1' in the following bit mask) 0x88438815, // U+0020 - U+0027 0x81515810, // U+0028 - U+002F I have to look more closely why '!' (for that matter '?') behaves differently from others in class 'a'. It may not be the line breaker but its caller (e.g. http://lxr.mozilla.org/seamonkey/source/layout/html/base/src/nsTextTransformer.cpp#550) that needs to be looked at.
I don't know what's into my head when I wrote that comma and right parenthesis behave the same way as full stop in comment #7. They don't. (so ignore my comment #8) Anyway, I found the cause and have a patch. Let's move this to bug 164759 because there's nothing Korean specific here. *** This bug has been marked as a duplicate of 164759 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Mark as verified as dup, it's sure not Korean specific.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: