Korean character input bug (while composing character)

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
cmlee
Junior Member
Junior Member
Posts: 6
Joined: 2018-07-07, 06:34 UTC

Korean character input bug (while composing character)

Post by *cmlee »

sorry my poor English.

i found this bug when i use multi rename tools.
i input some Korean string into the "Search for" box.
and while last character is selected (= blink) when i click another box (ex. Replace with). then last character is moved first position.

ex) 가나다 ==> 다가나
(last character '다' is moved to first position)


Korean character (= hangul) is combination type letter.

for example
one character '가' is composed by two Consonant/vowel 'ㄱ' and 'ㅏ'
some characters are composed by more Consonant vowel
ex) 밝 = ㅂ, ㅏ, ㄹ, ㄱ

character combination are ended. when possible combination Consonant,vowel are satisfied
or some special keys are pressed (ex. arrow, tab, enter, etc..)

i make some test program which has two textbox using c#.
input some Korean character and change focus by mouse click.
it has no bug. it properly operated.

i guess this bug is total commander's bug.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for your report.
I can reproduce the error in ALL editable comboboxes in Total Commander 32-bit and 64-bit, in all dialogs, but not in normal edit boxes. It only occurs when entering Korean text using the keyboard, not when selecting pasted text. The problem occurs when the last composited character is incomplete or could accept another consonant or vovel.

Unfortunately I couldn't find the reason for the error. It seems like leaving the control selects all characters in the control BEFORE Windows can send the complete last character.

I can only suggest two workarounds:
1. Press cursor right to insert the last character before clicking elsewhere, or
2. Use TAB instead of clicking
or
3. Click on the edit control itself before clicking elsewhere.
i make some test program which has two textbox using c#.
input some Korean character and change focus by mouse click.
It's not happening in edit boxes. Can you try with comboboxes with style CBS_DROPDOWN?
Author of Total Commander
https://www.ghisler.com
cmlee
Junior Member
Junior Member
Posts: 6
Joined: 2018-07-07, 06:34 UTC

Post by *cmlee »

It's not happening in edit boxes. Can you try with comboboxes with style CBS_DROPDOWN?
I make some test program. (C# WPF, Combobox)

<XAML>
<ComboBox Grid.Column="0" Name="comboSimple" Height="30" IsEditable="True"/>
<ComboBox Grid.Column="1" Name="comboDropDown" Height="30" IsEditable="True"/>
<ComboBox Grid.Column="2" Name="comboDropDownList" Height="30" IsEditable="True"/>

i inpute some korean character and BEFORE it's composition is completed
press dropdown button.
it no problem. all characters are properly shown.

I hope it help you.
thanks you :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hi!

It looks like WPF programs behave differently from plain Windows API programs written in C/C++.

I have created a sample Windows API program with Visual Studio and added a combobox and edit box to it. The error occurs there too.

I also added the combobox and edit box to the sample about box to check whether it only occurs with dynamically created controls. However, the error also occurs in a dialog box.

Here is my sample program (signed):
https://totalcommander.ch/beta/comboinputtest.zip
And the source code:
https://totalcommander.ch/beta/comboinputtest_src.zip

Maybe it helps you find the reason? So far I couldn't find a workaround.
Author of Total Commander
https://www.ghisler.com
cmlee
Junior Member
Junior Member
Posts: 6
Joined: 2018-07-07, 06:34 UTC

Post by *cmlee »

Hi

My Environment is below
OS : Windows 10 (Korean version),
Visual studio : 2017 (version 15.4.4), 2015 (version 14.0), 2013

I recompile your source code using my environment.

VS 2017 & 2015 : no error occurs
VS 2013 : fail to compile (can't load project)

i don't know why no error.
i will check it more.
see you later
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Do you get the error with my precompiled EXE?
Author of Total Commander
https://www.ghisler.com
cmlee
Junior Member
Junior Member
Posts: 6
Joined: 2018-07-07, 06:34 UTC

Post by *cmlee »

oh, it's my mistake.
i didn't test your precompiled EXE file.
i'm sorry.

the result:

Fist screen:
In Combobox : error occurs !!
In Textbox : No error occurs

Second Test (Popup):
In Combobox : error occurs !!
In Textbox : No error occurs

i made some test program for this issue.
but issue not occured :(

i will retry :) CYA
cmlee
Junior Member
Junior Member
Posts: 6
Joined: 2018-07-07, 06:34 UTC

Post by *cmlee »

i search for it on Korean developer forums.
they said that korean IME has bug.

- WM_KILLFOCUS is fired before last WM_CHAR event occured.

please refer below. (sorry this source is delphi source)

http://blog.devquest.co.kr/wp-content/uploads/2011/01/impimepatch.pas
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for the code, I will try it!
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Korean character input bug (while composing character)

Post by *ghisler(Author) »

This should be fixed in TC 9.21 rc1, please test it!
It didn't work with you code, but it gave me some good hints, so I created my own. Tested with German Windows 10 only, though.
Author of Total Commander
https://www.ghisler.com
cmlee
Junior Member
Junior Member
Posts: 6
Joined: 2018-07-07, 06:34 UTC

Re: Korean character input bug (while composing character)

Post by *cmlee »

Hi~ Ghisler
I do test new RC1 version.
It's work perfect. :)
Thanks you for your efforts.
Have a nice day :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Korean character input bug (while composing character)

Post by *ghisler(Author) »

That's great news, thanks for testing it!
Author of Total Commander
https://www.ghisler.com
Post Reply