Maniphest T94434

A happen appearing a letter "/、" not "、" when input "/" key with Microsoft PinYin. [Windows]
Closed, ResolvedBUG

Assigned To
Takahiro Shizuki (sntulix)
Authored By
Takahiro Shizuki (sntulix)
Dec 28 2021, 9:58 AM
Tags
  • Platform: Windows
Subscribers
Harley Acheson (harley)
Richard Antalik (ISS)
Takahiro Shizuki (sntulix)
Yuro (Yuro)
炎臻 (PrettyFireNOI7)

Description

version: 3.1.0 Alpha (rev 4f48b2992bd)
platform: Windows10 19043.1415

With Microsoft Pinyin IME, Inputting "/" key become a letter "/、" not "、" like below in text edit.
ng:


ok:

from: https://developer.blender.org/T93421#1270502

Revisions and Commits

rB Blender
D13771

Event Timeline

Takahiro Shizuki (sntulix) created this task.Dec 28 2021, 9:58 AM
Takahiro Shizuki (sntulix) added a comment.Dec 28 2021, 10:51 AM

I may be found the point to fix.

diff --git a/intern/ghost/intern/GHOST_ImeWin32.cpp b/intern/ghost/intern/GHOST_ImeWin32.cpp
index 47b5f5688df..26a019e6762 100644
--- a/intern/ghost/intern/GHOST_ImeWin32.cpp
+++ b/intern/ghost/intern/GHOST_ImeWin32.cpp
@@ -98,6 +98,7 @@ bool GHOST_ImeWin32::IsEnglishMode()

 bool GHOST_ImeWin32::IsImeKeyEvent(char ascii)
 {
+  printf("key code: %x\n", ascii);
   if (!(IsEnglishMode())) {
     /* In Chinese, Japanese, Korean, all alpha keys are processed by IME. */
     if ((ascii >= 'A' && ascii <= 'Z') || (ascii >= 'a' && ascii <= 'z')) {
@@ -106,7 +107,7 @@ bool GHOST_ImeWin32::IsImeKeyEvent(char ascii)
     if (IsLanguage(IMELANG_JAPANESE) && (ascii >= ' ' && ascii <= '~')) {
       return true;
     }
-    else if (IsLanguage(IMELANG_CHINESE) && ascii && strchr("!\"$'(),.:;<>?[\\]^_`", ascii)) {
+    else if (IsLanguage(IMELANG_CHINESE) && ascii && strchr("!\"$'(),.:;<>?[\\]^_`/", ascii)) {
       return true;
     }
   }

A screenshot of above build.

The patched build.
https://www.futuregadget.com/file/blender-T94434-fixing-build-20211228.zip

Harley Acheson (harley) changed the task status from Needs Triage to Confirmed.Dec 29 2021, 1:11 AM
Harley Acheson (harley) added a subscriber: Harley Acheson (harley).

Can confirm.

When outside of Blender and entering Pinyin, the three keys to the right of "M" give me ,。、
But inside Blender those same keys give me ,。/、

@Takahiro Shizuki (sntulix) - You should to create a new new diff and when you submit it give it a description like "Fix T94434: Windows IME Pinyin Forward Slash". I'll look out for it and edit if needed. Or if you need any other help let me know.

Harley Acheson (harley) changed the subtype of this task from "Design" to "Bug".Dec 29 2021, 1:12 AM
Yuro (Yuro) added a subscriber: Yuro (Yuro).EditedDec 29 2021, 1:57 AM

I think it because Microsoft Pinyin IME is a little different?
/ = /
\ = 、
I can get the same results in other software.


I don't know why, but I don't seem to be able to confirm this bug. When I use Microsoft input IME in other software, \ = 、


Ah, I can confirm this now, I'm OK because I enable this before:

In T94434#1279546, @Harley Acheson (harley) wrote:

@Takahiro Shizuki (sntulix) - You should to create a new new diff and when you submit it give it a description like "Fix T94434: Windows IME Pinyin Forward Slash". I'll look out for it and edit if needed. Or if you need any other help let me know.

I see, thank you.

I did it. D13771

Takahiro Shizuki (sntulix) added a comment.Jan 8 2022, 5:20 AM

Hi.


Ah, I can confirm this now, I'm OK because I enable this before:

OK.
Thank you.

And, I checked with Blender patched the diff above with the patterns Microsoft Pinyin compatible mode is enable and disable both.

  • Patched results inputting / at edit text box.
    • compatible mode is on: "、"
    • compatible mode is off: "/"
Yuro (Yuro) added a comment.Jan 9 2022, 12:02 AM
  • Patched results inputting / at edit text box.
    • compatible mode is on: "、"
    • compatible mode is off: "/"

Yes, I forgot that I had been using the compatible mode all the time, and I didn't understand this bug for a while. Sorry for the noise~

Harley Acheson (harley) closed this task as Resolved by committing rB57bea57f5ec6: Fix T94434: Windows IME Pinyin Forward Slash.Jan 10 2022, 6:10 PM
Harley Acheson (harley) added a commit: rB57bea57f5ec6: Fix T94434: Windows IME Pinyin Forward Slash.