Forum Discussion

AlekseiKlimkin's avatar
AlekseiKlimkin
Occasional Contributor
8 years ago

Cyrillic alphabet characters in JSON response

Hi Everyone,

I am wondering how to get a JSON response with Cyrillic characters in SoapUI.

 

If I set Content-Type "application/json; charset=utf-8" in the request headers that does not work and in the headers of the response I see just "application/json", and hence the cyrillic alphabet isn't recognized.

 

In my mock service I set the response Content-Type to be "application/json; charset=windows-1251" and it works just fine.

However, that doesn't work for the requests.

 

Thanks in advance.

  • Well, since no answers have appeared in this topic, I'd like to give a solution here in case someone else needs it later.

     

    You simply need to open the file SoapUI-5.3.0.vmoptions (or whatever version you are using) with a text editor and add 
    -Dfile.encoding=UTF8

    on a new line, and save it.

     

    The file can be found at the bin folder of your SoapUI application. For instance, I have mine located at C:\Program Files\SmartBear\SoapUI-5.3.0\bin

     

    After this is done, restart your SoapUI and everything should work fine.

  • AlekseiKlimkin's avatar
    AlekseiKlimkin
    Occasional Contributor

    Well, since no answers have appeared in this topic, I'd like to give a solution here in case someone else needs it later.

     

    You simply need to open the file SoapUI-5.3.0.vmoptions (or whatever version you are using) with a text editor and add 
    -Dfile.encoding=UTF8

    on a new line, and save it.

     

    The file can be found at the bin folder of your SoapUI application. For instance, I have mine located at C:\Program Files\SmartBear\SoapUI-5.3.0\bin

     

    After this is done, restart your SoapUI and everything should work fine.