Forum Discussion
I have changed encoding as UTF-8 in system propertiesm(attached screen shot) but still replacing with question mark.
Hi,
Swapping between utf-16 and utf-8 wont make any difference for your issue.
You need to encode your characters correctly!
As I said before (I obviously wasn't clear) escape sequences exist for the control characters you care about (if there wasn't, you wouldn't be able to do anything except delete the chars from your payload):
for the SOH character sequence, replace 'SOH' with ''
for the STX character sequence, replace 'STX' with ''
I've just done this on my machine and I've just executed it fine - the characters are saved as the escape sequences in the XML (see pic)
and the content of my script is
So no issues!
As I said before - whether it was UTF-8 or UTF-16 wouldn't make any difference in this case - UTF-16 is a superset of UTF-8 - i.e. every character in UTF-8 exists in UTF-16. Also - all the characters in UTF-8 have the same escape sequences as the equivalent character in UTF-16.
Hope this has explained a little and helped!
Rich
- ravi_ava7 years agoOccasional Contributor
Hello,
If we add control charcters () in our .xml file while importing to the soapui and testing we are getting an error response as our request is not accepting these chars.
- richie7 years agoCommunity HeroHi ravi_ava,
Can you confirm what your requirements state the allowed charset on your submissions is? Those escape sequences work for and endpoint expecting utf-8.
I'll have another look at the other equivalent escapr sequences for these control characters and get back to you with a subsequent post.
Cheers
Rich - richie7 years agoCommunity Hero
Hi ravi_ava
did you check the requirements of the allowed charset on your requests - just to confirm? We need to know absolutely what the supported charset that your endpoint is expecting - otherwise you'll never sort this. Its a quick fix once we know - but we need this info fella
For your submissions to your endpoint - do you get a payload for a successful submission? if so - can you confirm what the Content-Type header in the response is please?
I'm guessing application/json - but things can get complicated of it's odata json etc.(e.g. application/json; odata.metadata=minimal;)
cheers,
rich