P
P
patience2020-08-18 20:29:38
Node.js
patience, 2020-08-18 20:29:38

How to fix readline-sync encoding issues?

Instead of "Question in Russian" I get
:

const readlineSync = require('readline-sync')
let string = readlineSync.question('Вопрос на русском')
console.log(string)
=> ╨Т╨╛╨┐╤А╨╛╤Б ╨╜╨░ ╤А╤Г╤Б╤Б╨║╨╛╨╝

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jshandler, 2020-10-06
@jshandler

Type in terminal:chcp 65001

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question