D
D
DmitryName2016-02-02 09:05:37
JavaScript
DmitryName, 2016-02-02 09:05:37

How to make urldecode in ajax request?

I send a post request to the server with data in json format and Cyrillic turns into %25D0%25BF%25D1%2580
How to fix it?

$.ajax({
          type: "POST",
          url: '/saveObj/',
          contentType: 'application/json; charset=utf-8',
          data: JSON.stringify(arr),
          success: function(data)
          {
            // location.reload(true);
          }
        });

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sitev_ru, 2016-02-02
@sitev_ru

Encoding issues...

N
Nikita Konin, 2016-02-02
@jkjkjirf

Encoding problem. With so little information, it's hard to say anything more specific.

S
sim3x, 2016-02-02
@sim3x

Well you have already decided everything in the last question.
Why are you repeating?
in js
in django do
print(request.POST)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question