Reputation: 308
Im currently trying to develope a express webserver. The server sends a site with emojis, but the emojis are just shown as ??. Code:
send = send + "<div id='Website'>🌐 <a href='"+webseite+"'>Website</a></div>"
And it looks like this:
?? Website
Any way to fix this?
Upvotes: 0
Views: 894
Reputation: 21
I know it is late but it might help others you can set charset to UTF-8 for example:
app.get('/', (req, res) => {
res.writeHead(200, {'content-type': 'text/html; charset=utf-8'});
res.end(" 🚀 ");
});
Upvotes: 0
Reputation: 1084
If you you NodeJS with express, you can use :
https://www.npmjs.com/package/node-emoji
Il will stringify your emoji
Upvotes: 1