Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: some emoji could not be gotten in WindowsTerminal 1.5 #42

Closed
wants to merge 1 commit into from

Conversation

hymkor
Copy link
Contributor

@hymkor hymkor commented Feb 9, 2021

After WindowsTerminal is updated to version 1.5, some emojis ( e.g.: 👨U+1F468) can not be gotten by ReadRune() like unicodes between U+2000 and U+2FFF , when they are pasted by mouse's right button.

So, I tried to fix it like #38 , but to prevent from the failure like #40 , I appended the code to check whether NUMPAD(s) are pressed or not, because when the unicode is pasted , the sequence: (1) ALT-Presse, (2) some NUMPAD(s)-Pressed/Released and (3) ALT-Released are received from ReadConsoleInput.

You can confirm by these process.

  1. Select 👨 and press Ctrl-C
  2. Execute go run _example/simple.go on the WindowsTerminal.
  3. Press mouse's right button on the WindowsTerminal to paste 👨
  4. Without this patch, simple.go can not read anythin. With it, simple.go can read as 0xD83D: � (0xD83D is the first UTF16 code of the surrogate pair)

If problems do not exist, would you please merge it , @mattn ?

e.g.: Man Farmer(U+1F468 U+200D U+1F33E)
@hymkor
Copy link
Contributor Author

hymkor commented Feb 17, 2021

I would close this pull request because I found another problem.
Only wIth this patch, U+2460 ① can not be input in Windows Terminal 1.5 thogh it can in Pure Command Prompt.
( When U+2460 is input by IME, numpad code is not recieved on ReadConsoleInput )

I continue to investigate this problem on my fork branch for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant