SOLVED

Re: Multi-language support in REST API

Go to solution
Anonymous
Not applicable

Multi-language support in REST API

Hi,

We have a need to post data through the Marketo Assets API and it may contain characters used in different languages.  We used different charset options (UTF-8, UTF-16, UTF-32) in the HTTP Header but the value that gets stored in Marketo is not accurate.  However, if the same data is copy-pasted using Marketo Portal, it is accepted.  How can we submit data using Json or using x-www-form-urlencoded content type to support such multi-language scenarios while using REST API?

We are accessing the following endpoint for creating tokens - /rest/asset/v1/folder/folderId/tokens.json.

The header data is as below.

Content-Type - application/x-www-form-urlencoded

charset - UTF-8

Body as key-value-pairs:

folderType - Program

name - Program-name

value - some text value

type - text

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Multi-language support in REST API

Can't repro a problem with this. Make sure you have UTF-8 in the Content-Type:

     application/x-www-form-urlencoded;charset=utf-8

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Multi-language support in REST API

Please move the thread to Products and someone will answer it there. "Community" is for website feedback, not product support -- and yes, this is confusing!  See here for more info.

After you move the thread you should should update with which Asset endpoint you're accessing, and the exact payload of a sample request (you can attach this as a .HAR file to preserve integrity).

SanfordWhiteman
Level 10 - Community Moderator

Re: Multi-language support in REST API

Can't repro a problem with this. Make sure you have UTF-8 in the Content-Type:

     application/x-www-form-urlencoded;charset=utf-8

Anonymous
Not applicable

Re: Multi-language support in REST API

Thanks, Sanford.  We were testing with Postman and had charset as a separate header attribute.  Now, after setting Content-Type exactly the way you have specified, we are able to post multi-language data as expected.  Appreciate your prompt response.

SanfordWhiteman
Level 10 - Community Moderator

Re: Multi-language support in REST API

Good to hear. Note Charset: isn't a standalone HTTP header. Accept-Charset: is but that's in the other direction.