R
R
rizzli2015-08-10 19:15:27
JavaScript
rizzli, 2015-08-10 19:15:27

There is a JS file in utf-8, the server gives it to win1251. How to restore Cyrillic characters in the browser after such a conversion?

Faced such problem:
The server gives the page and scripts in win1251.
With the help of JS, I add some content, but when outputting lines in Cyrillic, left characters are obtained.
The problem is probably due to the fact that the js file is stored in utf-8, but is given in win-1251.

If anyone came across, tell me the solution, how to restore Cyrillic characters.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rizzli, 2015-08-10
@rizzli

I solved the problem using the article habrahabr.ru/post/118973

N
Nikita Kamenev, 2015-08-10
@NickStone

https://stackoverflow.com/questions/2696481/encodi...
Re-encode!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question