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

visual automation type fails on Norwegian chars - added ability to 'type' in non-English #812

Closed
olvd opened this issue Jun 3, 2020 · 4 comments
Labels

Comments

@olvd
Copy link

olvd commented Jun 3, 2020

Hi and thanks for this RPA tools :)

I'm experiencing what looks like an encoding issue with Norwegian characters.
Given the following:

task_name = "Skjæring"
type img/task-filter-input.png as `task_name`

The input typing is not performed and the output console reads:
type C:/dev/RPA/img/task-filter-input.png as Skjæring

If I remove the offending æ character, all works as expected.
Is it a bug or do I need to take extra step for these characters to be supported?

Thanks.
Cheers, Olivier

@kensoh
Copy link
Member

kensoh commented Nov 29, 2020

Sorry Olivier, I was away the past few months - tebelorg/RPA-Python#144

Thanks for raising this issue :) As Windows Unicode support isn't as straightforward as macOS/Linux, doing this in Windows may require changing system locale, using chcp command, and selecting a font to display native language correctly. More info on this - http://www.walkernews.net/2013/05/19/how-to-get-windows-command-prompt-displays-chinese-characters/

For my macOS, running below works as expected, showing correct output on the terminal prompt and Google search page.

https://google.com
task_name = "Skjæring"
type q as `task_name`
wait

Please lemme know if that works, or if you run into any issue or question.

@kensoh kensoh added the query label Nov 29, 2020
@kensoh
Copy link
Member

kensoh commented Nov 29, 2020

Checking further, noticed you are using visual automation from your example. If I recall, SikuliX (the computer vision engine used by TagUI) has issues with non-English characters. I'll look into it.

@kensoh
Copy link
Member

kensoh commented Nov 29, 2020

Found, indeed, there's an issue with typing non-English characters, due to SikuliX's US keyboard layout.

https://answers.launchpad.net/sikuli/+faq/933
https://answers.launchpad.net/sikuli/+question/260734

There's a solution from above, is to override the default typing behaviour by pasting text as unicode text.

Following code works ok on Google search page. By copying the text to clipboard, then pasting instead of typing it.

https://google.com
task_name = "Skjæring"
clipboard(task_name)
click search_bar.png
keyboard [cmd]v
wait

It requires above code commit which forces text copied to clipboard to be unicode, to let the paste method work. To use it, you can download the latest copy of the code from here and unzip to overwrite your existing installation (please drag the folders under tagui\src to overwrite your existing installation) - https://github.com/kelaberetiv/TagUI/archive/master.zip

In the next release, this will become part of the packaged zip files. Thanks for raising this issue!

@kensoh kensoh added feature and removed query labels Nov 29, 2020
@kensoh kensoh changed the title OCR type input fails on Norwegian characters OCR type input fails on Norwegian characters - added ability to 'type' non-English characters Nov 29, 2020
@kensoh kensoh changed the title OCR type input fails on Norwegian characters - added ability to 'type' non-English characters OCR type fails on Norwegian characters - added ability to 'type' non-English characters Nov 29, 2020
@kensoh kensoh changed the title OCR type fails on Norwegian characters - added ability to 'type' non-English characters visual automation type fails on Norwegian chars - added ability to 'type' non-English chars Nov 29, 2020
@kensoh kensoh changed the title visual automation type fails on Norwegian chars - added ability to 'type' non-English chars visual automation type fails on Norwegian chars - added ability to 'type' in non-English Nov 29, 2020
@kensoh
Copy link
Member

kensoh commented Dec 19, 2020

Closing issue since the latest packaged release TagUI v6.14 is out.

Release notes - https://github.com/kelaberetiv/TagUI/releases/tag/v6.14.0
To download v6.14 - https://tagui.readthedocs.io/en/latest/setup.html
Documentation - https://tagui.readthedocs.io/en/latest/index.html

@kensoh kensoh closed this as completed Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants