Forum Discussion

白夜有点黑's avatar
白夜有点黑
Contributor
5 years ago
Solved

Junk characters in SoapUI [DataSource] - [Data Connection] - [SQL Query] , how to handle this?

I need use Chinese Chars in SoapUI Pro [DataSource Step] - [Data Connection] - [SQL Query] command, but it shows junk characters here and the query result is null, how to handle this issue?

 

The SQL Query as below:

Select configs_account.id As accountId
From configs_account
Where configs_account.name = Trim("${GetTestData#name}")

 

=>

 

Select configs_account.id As accountId
From configs_account
Where configs_account.name = Trim("apitest_ValidData_使用中文作为名称")

 

  • I finally got the solution like below:

     

    This junk characters issue can be solved by update editor font setting:

    File -> Preferences -> Editor Settings

    Editor Font = Microsoft YaHei UI Light

     

    And the other issue which got 0 rows result in JDBC step if the sql command contains Chinese Chars can be sloved by update mysql connect String like "jdbc:mysql://<HOST:127.0.0.1>:<PORT:3306>/<DB>?user=<USER>&password=<PASSWORD>&characterEncoding=UTF8"

5 Replies

    • richie's avatar
      richie
      Community Hero

      Hi HimanshuTayal 

       

      looking at the screenshots, 白夜有点黑  is using SoapUI, you're using ReadyAPI - hence the difference in character rendering.

       

      白夜有点黑 what version are you using?  You'll probably have to upgrade to a more recent version of SoapUI or ReadyAPI! to resolve this.

       

      Cheers,

       

      richie

       

       

      • 白夜有点黑's avatar
        白夜有点黑
        Contributor

        I finally got the solution like below:

         

        This junk characters issue can be solved by update editor font setting:

        File -> Preferences -> Editor Settings

        Editor Font = Microsoft YaHei UI Light

         

        And the other issue which got 0 rows result in JDBC step if the sql command contains Chinese Chars can be sloved by update mysql connect String like "jdbc:mysql://<HOST:127.0.0.1>:<PORT:3306>/<DB>?user=<USER>&password=<PASSWORD>&characterEncoding=UTF8"