Hi everyone! When i trying send some cyrillic text via using
require("http").createServer
i getting very strange results.
Here is my code:
var wifi = require("Wifi");
wifi.connect('ssid', { password: 'pass'},function(s) {
console.log(s);
console.log(wifi.getIP());
});
function onPageRequest(req, res) {
var a = url.parse(req.url, true);
if (a.pathname=="/") {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('Hello World! Привет Мир!');
}
}
require("http").createServer(onPageRequest).listen(80);
And that's what i getting in my browser:
"Hello World! AFD0C8C2C5D2 ACC8D0!"
Can someone explain me, what i'm doing wrong? Thanks!
Search Options
Types to Display
Espruino
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi everyone! When i trying send some cyrillic text via using
i getting very strange results.
Here is my code:
And that's what i getting in my browser:
"Hello World! AFD0C8C2C5D2 ACC8D0!"
Can someone explain me, what i'm doing wrong? Thanks!