Byeongsik Jeon (@bsjeon) commented about dlls/imm32/imm.c:
- rc = immHkl->pImeEnumRegisterWord((REGISTERWORDENUMPROCW)lpfnEnumProc, - lpszwReading, dwStyle, lpszwRegister, - lpData); + TRACE( "hkl %p, procA %p, readingA %s, style %lu, stringA %s, user %p.\n", hkl, procA, + debugstr_a(readingA), style, debugstr_a(stringA), user );
- HeapFree(GetProcessHeap(),0,lpszwReading); - HeapFree(GetProcessHeap(),0,lpszwRegister); - return rc; - } - } + if (!ime->hIME || !ime->pImeEnumRegisterWord) return 0; + + if (!is_kbd_ime_unicode( ime )) + ret = ime->pImeEnumRegisterWord( (REGISTERWORDENUMPROCW)procA, (const WCHAR *)readingA, + style, (const WCHAR *)stringA, user ); There is something to consider in non-Unicode IME support. The IME language may be different from the current system locale. For example, using a Japanese IME in a Korean locale. Today, Windows can switch between IMEs of different language, so this needs to be considered.
To simplify a lot of complicated situations, I recommend that Wine consider dropping support(and library load) for non-Unicode IME. I'm pretty sure no one is using this old non-Unicode IME implementation. Today, all IMEs are Unicode versions. I'm glad to see IME improvements starting up again. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2354#note_26530