code:
var nerve = require("./nerve");
var sitemap = [
["/", function(req, res) {
res.respond("Русский");
}]
];
nerve.create(sitemap).listen(8100);
show in browser:
CAA:89
How it should be correct?
code:
var nerve = require("./nerve");
var sitemap = [
["/", function(req, res) {
res.respond("Русский");
}]
];
nerve.create(sitemap).listen(8100);
show in browser:
CAA:89
How it should be correct?
Nerve appears to interpret the strings you pass as binary strings, which results in the output you’re seeing. You can use the Buffer class to convert your UTF-8 chars to a binary string manually. You also need to set the charset in your headers:
If you want to try another framework, Express does a better job handling UTF-8. It interprets strings as UTF-8 and sets the charset correctly by default: