Forum Discussion

gus's avatar
gus
Contributor
11 years ago

Unicode support in keyword tests

Hi,



I am testing a 32 bit Unicode application with Hungarian text, which includes double acute letters like ő (see @ http://www.unicodemap.org/details/0x0151/index.html). Whenever I type a double-acuted letter in TestComplete, it silently reverts to an "acuteless" version, therefore ő becomes o, for example.



When using object or property checkpoints to see if a text field contains an expected value, and the value includes such characters, TC will report inequality when the two text is the same, because it cuts the cutes from the values stored for comparison.



Is there any workaround to this situation?

5 Replies

  • gus's avatar
    gus
    Contributor
    To let others facing with problem know, I've figured it out what was wrong, the solution, however, only applies to Hungarian.



    The solution is to change the value of registry entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\1252 from c_1252.nls to c_1250.nls, and restart your machine.



    Background: For ages, Microsoft has included an improper code page file for 1252, which is the codepage for Hungarian. When Windows is set to this code page, several (but not all) apps cut the double acutes, and ő becomes o, ű becomes u. This is not only aesthetics, but when such applications display an o, they may actually store the character ő, but if you invoke a command which acts on such strings (for example, you launch a file containing ő displayed as o), you'll fail, since the application will look for the o in the string which actually contains ő. Changing the NLS file assigned to the 1252 codepage to that assigned to codepage 1250 will solve the problem.



    The problem is not present in Windows 8 an up, but it is present in all older systems.
  • gus's avatar
    gus
    Contributor
    Hi,



    Yepp, I've done that first, but it seems it does not apply to keywords tests. Whenever I input a value containing ő (double-acuted o), and later I open it, TC displays an o. :(
  • Oh. Not sure then. My stuff is all scripted. I don't use keyword at all. Sorry.