cancel
Showing results for 
Search instead for 
Did you mean: 

utf-8 encoding is unsupported in the API so it returns me error

SOLVED
PriyaNandan
New Contributor

utf-8 encoding is unsupported in the API so it returns me error

Hi Team,

 

 I am using Ready API Automation Tool. In one of my API Request [POST] endpoint I have taken Input data from Excel Sheet and transferred the data to the Request through Forms Tab. But I am getting error for the encoding [utf-8].

The same Request when triggered without Data step from Ready API [hard-coded data in Request Payload], its working fine.

Please find the attached request/response details. previously i have raised Case No- Case #00467381 for the same..

I was unable to find the relevant case. So i have raised a new query.

 

Regards,

Priya

1 ACCEPTED SOLUTION

Accepted Solutions
richie
Community Hero

Re: utf-8 encoding is unsupported in the API so it returns me error

Hey @PriyaNandan,

The Description field in your payload is where youre getting the schema failure resulting in the error response.

The issue is following content " "Description" : "Test App1"" utf-8 doesnt recognise the circumflex above the A character.

Im guessing the extraction of the data from your data source is also pulling some markup along with the character from the spreadsheet.

There's various ways to sort this:

You could source the data from a .csv rather than .xls as .csv doesnt include any markup to drag out or you could change the datatype on the cells in your spreadsheet to 'text', rather than leave it as it is (which im guessing is set to -'general'). The problem with this approach is that just changing the type from 'general' to 'text' wont necessarily work. You can even try deleting the value out, change the type to 'text' and then type in your Description attribute value, however there is a known feature of excel that means that changing the type to 'text' only works if the cell hasnt already had any text in it. You might need to recreate the worksheet....brand new sheet, change the type to 'text' from 'general' and then type the value into the field.

Personally i dont bother using excel at all. I use text or csv files as my datasources as in my opinion using sprradsheets just adds a level of complication where something else can go wrong....like you current issue for example!

If i were you, id convert my .xls to .csv. this will automatically strip out the markup (which is what i think is the cause of your problem) cos csv type doesnt support any of that, leaving only your data which conforms to utf-8

Cheers

Rich
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

View solution in original post

2 REPLIES 2
richie
Community Hero

Re: utf-8 encoding is unsupported in the API so it returns me error

Hey @PriyaNandan,

The Description field in your payload is where youre getting the schema failure resulting in the error response.

The issue is following content " "Description" : "Test App1"" utf-8 doesnt recognise the circumflex above the A character.

Im guessing the extraction of the data from your data source is also pulling some markup along with the character from the spreadsheet.

There's various ways to sort this:

You could source the data from a .csv rather than .xls as .csv doesnt include any markup to drag out or you could change the datatype on the cells in your spreadsheet to 'text', rather than leave it as it is (which im guessing is set to -'general'). The problem with this approach is that just changing the type from 'general' to 'text' wont necessarily work. You can even try deleting the value out, change the type to 'text' and then type in your Description attribute value, however there is a known feature of excel that means that changing the type to 'text' only works if the cell hasnt already had any text in it. You might need to recreate the worksheet....brand new sheet, change the type to 'text' from 'general' and then type the value into the field.

Personally i dont bother using excel at all. I use text or csv files as my datasources as in my opinion using sprradsheets just adds a level of complication where something else can go wrong....like you current issue for example!

If i were you, id convert my .xls to .csv. this will automatically strip out the markup (which is what i think is the cause of your problem) cos csv type doesnt support any of that, leaving only your data which conforms to utf-8

Cheers

Rich
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

View solution in original post

PriyaNandan
New Contributor

Re: utf-8 encoding is unsupported in the API so it returns me error

Thanks alot for the resolution, it has resolved my issue.. got it will use csv format instead of xls..

New Here?
Join us and watch the welcome video:
Top Kudoed Authors