Closed Bug 12317 Opened 21 years ago Closed 20 years ago

Keyboard input convert text to Unicode ignore Keyboard Code PAge

Categories

(Core :: Internationalization, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ftang, Assigned: tague)

Details

The Keyboard input in window always convert text from CP_ACP to Unicode, instead
convert from the keyboard CP (which is dynamic) to Unicode.

See the find result of "::MultiByteToWideChar(CP_ACP" inside
widget/src/windows/nsWindow.cpp
To implement this correctly

2146   ::MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,charToConvert,length,
3459   unicharSize =
::MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,mIMECompositionString,mIMECompositio
nStringLength,

3467
::MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,mIMECompositionString,mIMECompositio
nStringLength,
3548     substringLength =
::MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,mIMECompositionString,

3591         substringLength =
::MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,mIMECompositionString+lastMBCSOffset
,


To implement this correctly, you need to keep track of keyboard code page. See
the mozilla classic code (or Java AWT) for example-

http://lxr.mozilla.org/mozilla/source/cmd/winfe/edview2.cpp (
CNetscapeEditView::OnWmeImeComposition function)
Notice that it convert the text from m_csid. And the m_csid is set by the
follwing functions-
CNetscapeEditView::OnInputLanguageChange

Also, you should implement some code like
3837 CNetscapeEditView::OnInputLanguageChangeRequest which responding
WM_INPUTLANGCHANGEREQUEST
Status: NEW → ASSIGNED
Target Milestone: M11
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
checked in a patch today.
QA Contact: teruko → ftang
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.