asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.22k stars 1.24k forks source link

Pyautogui is not support UTF-8 encoding #710

Open nocring opened 2 years ago

nocring commented 2 years ago

Pyautogui is not working correctly when I use Vietnamese bug

codesnipe000 commented 2 years ago

Hi, I think that pyautogui doesn't support these characters as of now.

The documentation website, has a list of characters supported by press(), keyDown(), keyUp(), and hotkey(): image

While this list doesn't include the typewrite() function, I think its safe to assume that the typewrite function doesnt work with characters outside of English either.

I would be happy to edit the documentation to include a note about this, as well as add capital letters to the list of supported characters, because the list doesn't include capital letters for some reason.

I am not sure about the process of editing pyautogui's documentation, and I don't see any notes about new contributors, could someone point me in the right direction?

ZenurikSD commented 2 years ago

I found this tool while following a beginner course about automating tasks (great work btw) and they mentioned that it lacks support for characters with diacritics that are common on other languages. The workaround was to use pyperclip to copy the string and use pyautogui's .hotkey("ctrl", "v") to paste it. Hope this helps.

Zedus112 commented 2 years ago

The workaround was to use pyperclip

or keyboard module with keyboard.write(" ї ")