Andrei Charnyshou
Andrei Charnyshou

Reputation: 74

nodejs encoding (Visual Studio)

When I use any characters from utf-8 encoding, I see the following ������ both in console and browser:

console.log("привет");
res.send("привет");

I noticed this for every new nodejs project in Visual Studio. I opened one of my old projects, it works fine there. Can't track the root cause

Upvotes: 0

Views: 225

Answers (1)

Dickens A S
Dickens A S

Reputation: 4054

sometimes if you save a file there will be an option to choose encoding as ASCII or UTF-8

your file might got saved to accept Unicode's so if you save your file as ASCII this issue will be resolved

Upvotes: 1

Related Questions