A
A
ajlee42019-12-11 15:21:07
JavaScript
ajlee4, 2019-12-11 15:21:07

Ajax Russian letters?

Hello. Please tell me how to solve the problem with Russian letters? When submitting the form, I get this
5df0def5e1450279138806.png

request:

$(function() {
      $('#catalog-search').submit(function(e) {
        var $form = $(this);
        console.log($form.serialize())
        $.ajax({
          type: $form.attr('method'),
          url: $form.attr('action'),
          data: $form.serialize()   
        }).done(function(response) {
          console.log('Запрос отправлен');
        }).fail(function(error) {
          console.error(error);
        });
    
        e.preventDefault(); 
      });
    });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-12-11
@ajlee4

There are no problems, everything works as it should. Russian letters are encoded according to the standard, the output of the encoded message to the console is out of place, but the server must decode them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question