Reputation: 29759
I'm trying to alert Russian text in JavaScript. I have:
<meta charset="UTF-8" />
But what I get is for example: Ваш Логин
What can I do about it?
Here is the code in html:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:asp="http://schemas.microsoft.com/ASPNET/20">
<head id="ctl00_htmlHead"><meta charset="UTF-8" />
...
in the view source html there is
alert("Ваш Логин");
but in my ascx file there is:
alert("Пароль");
Upvotes: 1
Views: 662
Reputation: 1943
Try using this: http://www.strictly-software.com/scripts/downloads/encoder.js
and:
alert(Encoder.htmlDecode("Ваш Логин"));
example: http://jsfiddle.net/gMUKY/
This is encoded in html entities not in javascript utf8 format.
Upvotes: 2
Reputation: 16915
Try to change the configuration for Auto-Detect UTF-8 encoding without signature.
it should be in Tools -> options -> Text editor
Or make visual studio save the documents in unicode:
Tools -> options -> Environment -> Documents
Upvotes: 1