[TC 8.0b5 x64] Quick search is broken in Korean.

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, it seems that you are right - I have to press "cursor right" after each character to make it work in quick search. I will check it in the debugger. Btw, I guess that 3-1. should be tk-wls-wkr-djq.
Author of Total Commander
https://www.ghisler.com
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

ghisler(Author) wrote:Btw, I guess that 3-1. should be tk-wls-wkr-djq.
Oops, you are right. :)

Please take into consideration of removing an IME combination box while doing quick search with korean, if possible. Because of the combination box, the function is very limited.

Thank you!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I could reproduce the new problems thanks to your detailed descriptions and will fix them in the next beta. Please keep testing this and report any new problems with the next beta.
Please take into consideration of removing an IME combination box while doing quick search with korean, if possible. Because of the combination box, the function is very limited.
Hmm, no idea how to do that. The 32-bit version uses it too.
Author of Total Commander
https://www.ghisler.com
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

I'm not sure why IME combination box is popping up in some application while inputting Korean characters. But it is rarely occurring. Exception handling could be required only for korean, If you are willing to solve the problem.

I've already searched delphi forum in korea. There are similar cases concerning to the IME combination box. In many cases, it makes people annoying as it is an unexpected operation. I guess it's basically because of the DBCS problem which is not present in the single-byte-characters world. The component seems not designed well for DBCS system.

The component used in quick search should use an IME handler to patch the IME composition box. WM_IME_COMPOSITION message handler should be used to process DBCS characters. The following is one of the case occurring in tsGrid component. According to the writer of the codes below, it's possible to fix the problem with other components too.

I know it could be quite a difficult problem as you've never seen it before and probably will never come accross in the rest of your whole life. Nonetheless, it would be really appreciated as one of a big fan of Total Commander if you would at least give it a try. I've never properly used the quick search function until now.

http://www.delmadang.com/community/bbs_view.asp?bbsNo=17&bbsCat=0&st=C&keyword=%uD55C%uAE00%20ime&indx=391266&keyword1=한글&keyword2=ime&page=1
constructor TmyLIB.Create;
begin
// Processing Korean Characters in Grid
Application.OnMessage := AppMessage;
.....
end;

procedure TmyLIB.AppMessage(var Msg: TMsg; var Handled: Boolean);
var lead: integer;
IMC: HIMC;
pt : TPoint;
rct: TRect;
tCF : tagCompositionForm;
begin
// Use in Grid Only
if screen.ActiveControl is TtsGrid then begin
// Korean Message Procedure
if (Msg.message = WM_IME_COMPOSITION) or
(Msg.message = WM_CHAR) or
(Msg.message = WM_IME_STARTCOMPOSITION) or
(Msg.message = WM_IME_ENDCOMPOSITION) then begin
if (prevMsg.message = WM_CHAR) and
(prevMsg.wParam > $0080) and
(Msg.message = WM_CHAR) and
(Msg.wParam > $0080) then
lead := 12
else
lead := 0;

IMC := ImmGetContext(ImmGetDefaultImeWnd(Application.ActiveFormHandle));
GetCaretPos(pt);
tCF.dwStyle := CFS_RECT;
pt.Y := pt.Y - 3;
pt.X := pt.X + lead;
tCF.ptCurrentPos := pt;
rct.TopLeft := pt;
tCF.rcArea := rct;
ImmSetCompositionWindow(IMC,@tCF);
ImmReleaseContext(ImmGetDefaultImeWnd(Application.ActiveFormHandle), IMC);
end;
prevMsg := Msg; // Keeping message. Move to right in an IME combination box
//if WM_CHAR comes sequentially and it is Korean character.
end;
Handled := False;
end;
As you may know, it occurs in 32-bit TCMD too.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It occurs probably because there is no edit box yet which could show the partial input. Maybe I can react to WM_IME_STARTCOMPOSITION or so and show the quick search dialog already then. Do you know whether this is always the first message when entering IME characters?
Author of Total Commander
https://www.ghisler.com
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

Do you know whether this is always the first message when entering IME characters?
That's correct. It occurs with the first message of Korean characters. It doesn't matter with English chars. That is, it only happens when you change a keyboard to Korean IME and start doing a quick search.

Thanks for the consideration and effort.
Only using TCMD x64. :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I haven't tried to get rid of the IME window yet, but I will try in a later beta.

However, with beta 8, the quick search in the 64-bit version should now work like in the 32-bit version also with longer Korean names. Can you test it, please? If it doesn't work, please describe which test cases don't work.
Author of Total Commander
https://www.ghisler.com
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

It seems like working except for QSx 64.

Refer to the following link:
http://www.ghisler.ch/board/viewtopic.php?p=233689#233689

PinYin must be enabled in configuration to perform a quick search with lead consonants of Korean.
Only using TCMD x64. :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It seems like working
Great!
except for QSx 64.
I hope that the author of QSx 64 can handle it.
Author of Total Commander
https://www.ghisler.com
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

ghisler(Author) wrote:
It seems like working
Great!
except for QSx 64.
I hope that the author of QSx 64 can handle it.
Should be easy. The QSx 64 version was not changed yet. (as the new version was experimental.)
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

sheppaul wrote:It seems like working except for QSx 64.

Refer to the following link:
http://www.ghisler.ch/board/viewtopic.php?p=233689#233689

PinYin must be enabled in configuration to perform a quick search with lead consonants of Korean.
Should work now, please test.
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

It works like a charm.

Thank you! Samuel.
I haven't tried to get rid of the IME window yet, but I will try in a later beta
Yeah! :)
Only using TCMD x64. :)
Post Reply