V
V
Vladimir Suvorov2016-12-12 19:19:42
JavaScript
Vladimir Suvorov, 2016-12-12 19:19:42

Ajax + text.txt encoding not working?

There is a text file, it stores ( Russian text (The whole problem is in Russian ... If anything, it cannot be replaced with another language ..). When collecting information using ajax, responseText returns hieroglyphs ... Of course I will provide the code ... Maybe someone -someone encountered such a problem, and knows the solution??
https://jsfiddle.net/mykachanov/k76pzb1t/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
ProjectSoft, 2016-12-12
@my_kachanov

In .htaccess
The text file itself is naturally encoded in UTF-8

J
Jony1337, 2016-12-12
@Jony1337

Enter the text into the database, from where you can also get it via ajax , just set the encoding to utf8 there.
If this does not suit you, then put both the .txt file and the file in which the utf8 encoding code can help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question