Reputation: 534
I'm using the next code jQuery code -
success: function(result){
$('#taglineResults').text(result) ;
alert('אבג');
}
as you can see the content in the alert is in hebrew , but the alert I get is three rectangles.
I've tried using unescape
and decodeUri
but it didn't help, how could I solve this problem?
Thanks in advnace
Upvotes: 3
Views: 582
Reputation: 13812
Alternatively, you can us \u
notation
alert("\u05D3\u05D4\u05D5");
Upvotes: 0
Reputation: 3414
this 100% works. Change encoding of your source code file to utf-8. You can use notepad++ for this. Then rewrite your text in hebrew again and save.
You will see hebrew in alert.
Upvotes: 3
Reputation: 2220
If it's showing as blocks, the font your system/browser uses for alerts doesn't support those characters. I wouldn't use an alert in this case.
Upvotes: 1