K
K
Klonov2019-07-31 12:19:39
JavaScript
Klonov, 2019-07-31 12:19:39

Black diamonds instead of text, what should I do?

I load the text into the input, I output it, but instead of the text, question marks appear in a black rhombus. The downloaded text is in ANSI encoding, and if you convert it to UTF-8, then everything works fine. But it is necessary for ANSI to work.
the code

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Klonov, 2019-07-31
@Klonov

I figured out this problem, everything turned out to be very simple: it was just necessary to specify the windows-1251 encoding as the second parameter in the readAsText method, because. default is UTF-8

S
Siverius, 2019-07-31
@Siverius

<meta charset="ANSI">
have you tried?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question