Micro Focus QTP (UFT) Forums
Trouble Getting UFT to Work with Simplified Chinese - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Trouble Getting UFT to Work with Simplified Chinese (/Thread-Trouble-Getting-UFT-to-Work-with-Simplified-Chinese)



Trouble Getting UFT to Work with Simplified Chinese - hhamilton - 02-26-2016

Hi all. I'm hoping somebody out there can be of some help to me.

I'm trying to enhance my existing scripts, which were written and work in English, to work with Simplified Chinese. The scripts are used to create a basic case and the only pieces that need to be translated is the drop down values. The lists do not have all of the same values and sort order for each language. So, for example, the English list could have  A, B, C, and D and the Chinese list could have B, C, F, and G. We have been able to successfully adapt and run  these scripts in Spanish, French, German, and Italian.

The method we have used for the other languages is to store all of the values in a local CSV file and do a lookup in the file of the English word when a translation is needed. Below is the code on how we declare in the CSV file and a snip of a row in the CSV file.

My problem is when the Chinese values are read into UFT (v12.02) from the CSV file, they do not match; therefore, no value is selected. In the CSV file snippet, you can see the characters for China are displayed as "中国" but  "涓浗" is what I see in UFT.


Anybody have any thoughts?
Thanks,

Harry


Code:
' Define connection and recordset and read table
    Set objConnection = CreateObject("ADODB.Connection")
    Set objRecordSet = CreateObject("ADODB.Recordset")

    strPathtoTextFile = "D:\UPSData\QTP\Input Data\"
    strFileName = "ECM_LOV_TranslationDecode.csv"
    
    objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _  
    "Data Source=" & strPathtoTextFile & ";" & _
    "Extended Properties=""text;HDR=YES;FMT=Delimited"""

Code:
COUNTRY,Country,CN,China,China,Cina,Chine,China,中国,



RE: Trouble Getting UFT to Work with Simplified Chinese - supputuri - 03-09-2016

This is an encoding issue, you have to convert the non-ascii to unicode and then use the same in your script.


RE: Trouble Getting UFT to Work with Simplified Chinese - vinod123 - 03-10-2016

Did u install language pack of the UFT 12.02