Solved

hebrew inside alert box

Posted on 2007-11-16
11
900 Views
Last Modified: 2010-05-18
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?
0
Comment
Question by:sasha85
  • 7
  • 3
11 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
1. set the codepage of the page to hebrew (windows-1255) or utf8
2. save the page with hebrew or utf8
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
http://www.w3.org/International/tutorials/bidi-xhtml/

alert("\u05DD\u05D5\u05DC\u05E9")
0
 

Author Comment

by:sasha85
Comment Utility
alert("\u05DD\u05D5\u05DC\u05E9")
?:)
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
Alternative to setting the codepage is to alert directly in unicode as I did in the alert
0
 

Author Comment

by:sasha85
Comment Utility
the problem is that my page is already in utf8...
and inspite of it
alert("×’×›×’×¢×’×›×¢×’×›×¢×’×›")
got me
????????????
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
Did you save the actual file in utf8?
0
 
LVL 63

Expert Comment

by:Zvonko
Comment Utility
Perhaps better this way round:
alert("\u05E9\u05DC\u05D5\u05DD");



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



0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 250 total points
Comment Utility
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
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
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
 

Author Comment

by:sasha85
Comment Utility
ok...thank you:)
i think it because of my host acount...it recoding all what i saved...
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now