If you’ll ever try to use automation for testing globalization readiness on applications you are going to discover that the keyboard input API does not have any function for entering Unicode texts. If you’ll try to use VkKeyScan for converting an Unicode character to a virtual key – in order to map it to a keystroke – you’ll discover that the Windows Keyboard Input API will return you nothing because current keyboard layout is not able to produce the requested character.
You could the clipboard for inserting Unicode text but be aware that thin method does not enable you to test real keyboard input. If you are not using standard windows controls you have to test quite a few different keyboard layouts.
Paste is not a valid testing method.
Take any input field in a Flash application (but not one with embedded fonts). And try typing Hindi. It does not work. But you can paste, no problem.
The fact that paste works does not tell you if the application is ready to use for that language.
So pasting is not a good testing method.
(homework: how is this possible?)
I agree with you and I already know why it does not work.
I’ve forgot to update the article but there a bug I filled on AutoIt bug tracker that will fix this:
http://www.autoitscript.com/trac/autoit/ticket/462
I hope I will have time to write a small routine for converting the Unicode characters to sequences of ALT+…
Out of curiosity, have you considered using the UIAutomation framework instead of sending keystrokes directly? It’s a lot higher level, more reliable and way more likely to work properly with Unicode strings.
Let’s say that not all the software we have to test supports Automation and that we are not able to enforce this – sad by true.