Japanese and Chinese character support

Ask general questions here.
gurpreet singh
Posts: 5
Joined: Wed Feb 06, 2013 9:02 am

Japanese and Chinese character support

Post by gurpreet singh » Wed Feb 06, 2013 6:44 pm

I'm am not able to get japanese or chinese character properly.
I am using python 2.5.

Code: Select all

 import RanorexPython as Ranorex
Ranorex.ControlGetText(combobox)
In output i'm getting ?? in place of japanese or chinese character.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Japanese and Chinese character support

Post by Support Team » Wed Feb 06, 2013 6:55 pm

gurpreet singh wrote:I'm am not able to get japanese or chinese character properly.
I am using python 2.5.
Which Ranorex version do you use?
Unicode (including Japanese and Chinese) characters are supported since version 2.0.

Regards,
Alex
Ranorex Team

gurpreet singh
Posts: 5
Joined: Wed Feb 06, 2013 9:02 am

Re: Japanese and Chinese character support

Post by gurpreet singh » Thu Feb 07, 2013 6:29 am

i'm using python 2.5.1 but i dont know version of ranorex because it is embeded python script.
Ranorex version is "Ranorex-1.5.3.6580" as mentioned in exe.

Code: Select all

import os, sys, optparse, imp
import RanorexPython as Ranorex
import os.path
import win32api
import time

def main():

    timeScale = 1.0
    Ranorex.ElementIgnoreInvisible(1)

    form = Ranorex.FormFindTitle("Properties", Ranorex.MATCH_SUBSTRING)
    if form == 0:
        return 1
    Ranorex.FormActivate(form)

    editPath = Ranorex.FormFindChildControlId(form, 6745)
    if editPath == 0:
        return 1
    Ranorex.ControlSetFocus(editPath)

    Ranorex.ControlSendKeys(0, "", 500)
    dPath = Ranorex.ControlGetText(editPath)

    editControl = Ranorex.FormFindChildControlId(form, 6746) 
    if editControl == 0:
        return 1
    Ranorex.ControlSetFocus(editControl);

    controlElement = Ranorex.ControlGetElement(editControl)
    if controlElement == None:
        return 1
    time.sleep(2)

    Ranorex.ControlSendKeys(0, "", 500)
    Path = Ranorex.ControlGetText(editControl)

    writePath = dPath + "\n" + cPath
    tempfile = open("C:\\Temp\\pathfile.txt", "w")
    tempfile.writelines(writePath)
    tempfile.close()
i have pasted the code to more clear the things.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Japanese and Chinese character support

Post by Support Team » Thu Feb 07, 2013 9:52 am

gurpreet singh wrote:Ranorex version is "Ranorex-1.5.3.6580".
As stated before, Ranorex 1.X does not support Unicode characters, sorry!
You need to update to a newer (not outdated) Ranorex version. You can download the current version from the following website and use it for a 30 day trial period:
http://www.ranorex.com/download.html

Regards,
Alex
Ranorex Team