hebrew inside alert box

when i use script to alert("dfdfd")
yes...the same javascript alert with the ok button...
all my hebrew looks like this:
?????? ?????-???? ??????
?????????.
it sure not hebrew:)

someone here bump into the same problem?
sasha85Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Michel PlungjanConnect With a Mentor IT ExpertCommented:
If I can show it, I do have hebrew everywhere here:


<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<div id="test">
Listen to a recording of this text by גל ויסברג (Gal Weisberg)
</div>
 
<script>
alert("\u05DD\u05D5\u05DC\u05E9\n"+document.getElementById('test').innerHTML+'\n'+"גל ויסברג")
</script>

Open in new window

0
 
Michel PlungjanIT ExpertCommented:
1. set the codepage of the page to hebrew (windows-1255) or utf8
2. save the page with hebrew or utf8
0
 
Michel PlungjanIT ExpertCommented:
http://www.w3.org/International/tutorials/bidi-xhtml/

alert("\u05DD\u05D5\u05DC\u05E9")
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
sasha85Author Commented:
alert("\u05DD\u05D5\u05DC\u05E9")
?:)
0
 
Michel PlungjanIT ExpertCommented:
Alternative to setting the codepage is to alert directly in unicode as I did in the alert
0
 
sasha85Author Commented:
the problem is that my page is already in utf8...
and inspite of it
alert("×’×›×’×¢×’×›×¢×’×›×¢×’×›")
got me
????????????
0
 
Michel PlungjanIT ExpertCommented:
Did you save the actual file in utf8?
0
 
ZvonkoSystems architectCommented:
Perhaps better this way round:
alert("\u05E9\u05DC\u05D5\u05DD");



alert("\u05d6\u05b0\u05d0\u05b5\u05d1");



0
 
Michel PlungjanIT ExpertCommented:
The weird text is actually hebrew in my pspad editor and is shown as such by the browser too once I saved it as utf-8
0
 
sasha85Author Commented:
ok...thank you:)
i think it because of my host acount...it recoding all what i saved...
0
 
Michel PlungjanIT ExpertCommented:
So may I ask why a "B" grade - if you could not verify my answer is correct, then you could have waited. If it was not correct, then it should not have been accepted.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.