cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with encoding

Highlighted
New Contributor

Problem with encoding

Hi there!

I have a problem with system encoding:

2020-03-24 18_16_37-SoapUI 5.5.0.png''123.png

And I cant change this option on working computer (file is not accessable to write):

-Dfile.encoding=UTF8

The problem:

1) (screen 1) I cant change encoding in REST mock. I tried simply show HTML page, but it is in wrong encoding (cp1251)

2) (screen 2) I get response from mock, and then send it to another service. Result: my request sended in cp1251, not in utf-8, even if i set Encoding = UTF-8 to request settings

 

Any suggestions how to fix it without Dfile.encoding=UTF8.
I'm not a java-guy, tryed something like

 new String(context.expand( '${Redirect to local mock#Response}' ).getBytes('UTF-8'), 'UTF-8')

but no luck.

 

Thanks a lot!

 

3 REPLIES 3
Highlighted
Community Hero

Re: Problem with encoding

As this is part of the work request your administrator to allow you with the required change to the file or request them to make the change. I don't think that the request will be denied.


Regards,
Rao.
Highlighted
New Contributor

Re: Problem with encoding

Maybe exists some groovy way to change/convert encoding of stiring ...
Or some way to pass option as startup parameter for shortcut.

 

System admins response in weeks, and the project from SOAP will used by many users, but not so important to wait for few weeks, so that's not comfortable and quick way.

UPD:  tried setProperty("file.encoding", 'UTF-8') + set encoding to utf-8 everywhere, but no luck

Check out the project i attached (it may required to set file.encoding to cp1251 manually in options to simulate issue)

Highlighted
Community Hero

Re: Problem with encoding

Got utf-8 as file encoding.
Can see correct in raw response and response edit doesn't show correctly.

Thank you for the share.


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors