Multi-language support in REST API | Community
Skip to main content
March 22, 2017
Solved

Multi-language support in REST API

  • March 22, 2017
  • 2 replies
  • 5429 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

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

2 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
March 22, 2017

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

March 22, 2017

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
New Participant
March 23, 2017

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

SanfordWhiteman
New Participant
March 22, 2017

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).