Ask a Question

ISO-8859-1 Encoding Query - Doesn't Appear to be Working?

richie
Community Hero

ISO-8859-1 Encoding Query - Doesn't Appear to be Working?

Hi,

 

I'm publishing a REST POST message (containing a flat file saved in ISO-8859-1 encoding with a ÿ character) via an ESB to a CRM to create a new record on the CRM via the ESB.

 

I have a REST GET request message setup to confirm the change to the CRM was updated correctly - however, the response to the GET indicates a twobyte character 'ÿ' rather a single 1 byte character 'ÿ' (a y character topped with a daeresis diacritic) - indicating there is a problem with the encoding on my request/response.

 

If I use wget to submit the request - the response I get back from the ESB indicates the encoding works correctly, but NOT when I use SoapUI.

 

For some reason I cannot get the response to return the ÿ character

 

I found the following:

 

https://stackoverflow.com/questions/35747109/where-do-i-set-character-encoding-in-soapui-preferences

 

and it indicates that I need to set the Encoding attribute on the 'REST Request properties' to 'iso-8859-1'.  I tried this but I'm still getting the a failed assertion on the attribute because I'm still getting the 2 character value in the response.

 

the URL also indicates that I can change the header 'text/xml; charset=iso-8859-1' on the request - I tried this also - but again I'm still not getting the 'ÿ' rather than the ÿ character in the response.

 

I'm kindof stumped - I don't know what to do - can anyone advise?

 

My Test Case is as follows:

 

 

Datasource (Directory) with fileContents property (sourcing a flat file from my local drive)
POST REST request (${DataSource - directory#fileContents}) - 'Encoding' set as iso-8859-1 on Request Properties
GET REST request (to check the POST was successful)  - 'Encoding' set as iso-8859-1 on Request Properties

 

To summarise.

 

I set the 'Encoding' on the POST REST Request Step Properties to 'iso-8859-1' on the POST

I set the 'Encoding' on the GET REST Request Step Properties to 'iso-8859-1' on the POST

 

I also tried creating a Content-Type header on the GET Request as 'text/xml; charset=iso-8859-1'  and this didn't work either!

 

Any help/advice/guidance anyone can provide would be gratefully appreciated!

 

Thanks to all!

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
2 REPLIES 2
nmrao
Community Hero

The link you pointed was not just suggesting to use certain encoding, it was based on the question.

May be you can use "UTF-8" instead of that, as you appear seems to use multi-byte char.


Regards,
Rao.
richie
Community Hero

I've had it confirmed by the developer that I can't use UTF-8 - this is a superset of iso-8859-1 and the CRM I'm publishing to only supports 8859-1.

 

The original question asks about mocking request/responses using iso-8859-1 - the answer given indicates UTF-8 in the screenshot - but the comment after that indicates to use either UTF-8 or iso-8859-1 depending on your system's requirements.

 

Thanks

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
cancel
Showing results for 
Search instead for 
Did you mean: