Forum Discussion

Defender's avatar
Defender
Contributor
14 years ago

How to use UTF encoding

Hi!

I need to check the REST request (for example, POST) with the same body in different encodings: ANSI, UTF-8, UTF-16.

I can create the files & insert them as a body in SoapUI using "Load From" but I can see 3 wrong symbols for UTF-8 and 2 for UTF-16. So the request body is not identical to what I want to send.

Could you please advice how to do that correctly in SoapUI?

I use 3.6.2 snapshot.
  • Hello,

    There's a TestStep property called Encoding. Have you tried to change that?

    You can set that property to any encoding (not just the predefined two).


    Regards

    Henrik
    eviware support
  • Hi Henrik, thanks for your response!

    I still cannot understand how to use this property. The following issues were found:
    1). When I try to use load the body from file which has UTF-8 or UTF-16 format - the excess symbols in the start of the body appears independently on Encoding property value (I tried UTF-8, UTF-16, no value).
    2). When I set the Encoding to UTF-16 & use the body loaded from file of any format - I can see the mass of unreadable characters instead of my body in the request - RAW tab. Of course service I try to push this request returns 400 saying the body is bad.

    Could you please advice me how to use it correctly?
  • Hi,

    this sounds like an issue with the file loading that doesn't seem to detect the control characters in the beginning of the file. Could you report this in the soapUI Pro Bugs forum so we can get it into our system accordingly?

    Thanks in advance!

    regards,

    /Ole
    eviware.com