Eugene
Eugene

Reputation: 153

Parse.com REST API with russian characters

I update a record at parse.com through its REST API. The problem is that as soon as I start using russian characters in the request, I get an error - invalid utf-8 string was provided. Here is the examples of successful and invalid curl requests. The differences are marked by red circles.

example of curl requests

Upvotes: 0

Views: 1319

Answers (1)

Robert Rowntree
Robert Rowntree

Reputation: 6289

if you are going to use non-utf8 char sets then just state that in your headers when you POST.

 "Content-Type: application/json; charset=UTF-8

replace above with suitable container for your particular charset.

The above makes your http client a good citizen that signals correctly the Mimetype/charset of the bits inclosed in the POST.

Then, on their end, in their backend, parse/mongoDB would also need to provide for variety of encodings/ charsets. IMO - parse would have this covered and would not require just UTF-8.

but , u may want to investigate that last point in the docs.

Upvotes: 1

Related Questions