A
A
Artem Komarov2014-09-03 10:17:31
Node.js
Artem Komarov, 2014-09-03 10:17:31

IE again excelled or wrong encoding in NodeJS?

The point is. There is a NodeJS get method that takes the name of the server as input and checks it for availability by parameters.

app.get('/addserver', function(request, response) {
  var $set = {};
        $set[request.query.server] = {"available":true, "token":request.query.accesskey};
        validator.check($set).done(function(){
    response.send('OK!');
    response.end();
        }).fail(function(e){
    response.send(e);
    response.end();
        });
});

Of all tested browsers (Chrome, Opera, Firefox, Safari) request.query.server is passed perfectly in the right encoding (UTF8) and only IE passes "����224". How to overcome this nightmare?
UPD. Request example:
http://***.ru/addserver?server=РИЦ224&accesskey=a5d86F...обрезано

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Komarov, 2014-09-03
@m0sk1t

Decided to form a link already urlencoded...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question