User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Oct 2001
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)
    Total Downloaded

    Trouble Getting UFT to Work with Simplified Chinese.

    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?


    Code Sample (CSV File Object):
    ' 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"""

    CSV File (Sample of rows):
    COUNTRY,Country,CN,China,China,Cina,Chine,China,中国 ,
    COUNTRY,Country,DE,Germany,Alemania,Germania,Allem agne,Deutschland,德国,

  2. #2
    SQA Knight
    Join Date
    May 2006
    Playa Del Rey, California, United States
    Post Thanks / Like
    17 Post(s)
    1 Thread(s)
    Total Downloaded
    You basically have 3 gates which things get encoded will be encoding nightmare at each one.

    the CSV file, then from the file stream to the ODBC driver, than from the ODBC driver to ADODB connector.

    I don't really have a good way of doing it using CSV (or in general in VBScript). I'd probably either recommend using a base64 encoder and encode it in base64 in the CSV file, then decode it in your automated test. The downside is, the CSV file will look like complete gibberish, but that will by pass the encoding problems.
    David Lai
    SDET / Consultant
    LinkedIn profile



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:50 PM.

Copyright BetaSoft Inc.