Closed
Bug 15657
Opened 26 years ago
Closed 26 years ago
[key]The nsWindow::ProcessMessage MW_CHAR should not assume the data is in ACP
Categories
(Core :: Internationalization, defect, P1)
Tracking
()
VERIFIED
FIXED
M11
People
(Reporter: ftang, Assigned: ftang)
References
Details
(Whiteboard: fix check into keyEvent branch. Need to land to tip)
I think this is realated to bug 14845. What happen is the following code call IsDBCSLeadByte.
But if you read the documentation of IsDBCSLeadByte ( http://msdn.microsoft.com/library/specs/s1cea7.htm ), it say
Comments:
The system ACP is used to check the ranges.
Therefore the code is not good if both (a) the ACP is a double byte code page, such as Chinese/Japanese/Korean (CP 932,936,949,950) and (b) the data
is not in ACP (say mCurrentKeyboardLayout is not ACP). This is one of the reason why we cannot type Greek/German/Cyrillic character in Japanese
Window . There are other problem about the switching itself.
Tague, when will we got MW_CHAR ? Will we get it even when IME is on ? We probably need a version of IsDBCSLeadByte which take the
mCurrentKeyboardCP as input.
http://lxr.mozilla.org/mozilla/source/widget/src/windows/nsWindow.cpp
2396 case WM_SYSCHAR:
2397 case WM_CHAR:
2398 {
2399 unsigned char ch = (unsigned char)wParam;
2400 UINT char_result;
2401
2402 //
2403 // check first for backspace or return, handle them specially
2404 //
2405 if (ch==0x0d || ch==0x08) {
2406 mHaveDBCSLeadByte = PR_FALSE;
2407 result = OnChar(ch,ch==0x0d ? VK_RETURN : VK_BACK,true);
2408 break;
2409 }
2410
2411 //
2412 // check first to see if we have the first byte of a two-byte DBCS sequence
2413 // if so, store it away and do nothing until we get the second sequence
2414 //
2415 if (IsDBCSLeadByte(ch) && !mHaveDBCSLeadByte) {
2416 mHaveDBCSLeadByte = TRUE;
2417 mDBCSLeadByte = ch;
2418 result = PR_TRUE;
2419 break;
2420 }
2421
2422 //
2423 // at this point, we may have the second byte of a DBCS sequence or a single byte
2424 // character, depending on the previous message. Check and handle accordingly
2425 //
2426 if (mHaveDBCSLeadByte) {
2427 char_result = (mDBCSLeadByte << 8) | ch;
2428 mHaveDBCSLeadByte = FALSE;
2429 mDBCSLeadByte = 0;
2430 result = OnChar(char_result,ch,true);
2431 } else {
2432 char_result = ch;
2433 result = OnChar(char_result,ch,false);
2434 }
2435
2436 break;
2437 }
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Updated•26 years ago
|
Target Milestone: M11
| Assignee | ||
Updated•26 years ago
|
Priority: P3 → P1
Summary: The nsWindow::ProcessMessage MW_CHAR should not assume the data is in ACP → [key]The nsWindow::ProcessMessage MW_CHAR should not assume the data is in ACP
| Assignee | ||
Updated•26 years ago
|
Whiteboard: fix check into keyEvent branch. Need to land to tip
| Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 1•26 years ago
|
||
fix in keyEvent_19991004_BRANCH landing
Updated•26 years ago
|
QA Contact: teruko → ftang
You need to log in
before you can comment on or make changes to this bug.
Description
•