sara10,
It does indeed seem that Hebrew characters are the problem. Javscript is really defined as a "Latin-1" langage. Urlencode() won't help because javascript's unescape() will always convert to Latin-1 (unless things have moved on since my reference book was printed).
What I suggest is that you try serving your string segments into separate <span></span> tags each with its own ID.
With a bit of imagination you may be able to shuffle these spans around with dom methods without ever needing to handle the strings themselves in javascript.
Of course, the success of this depends entirely on what you want do client-side with the text.
If you need to perform string manipulations then it seems you will inevitably(?) end up needing to handle the strings in javascript so back to the same old problem. Same with Ajax techniques because server responses would need to be handled by javascript.
Thinking out loud, maybe there are two ways to meet a string manipulation requirement:
- Do it server-side then re-serve the page (if the Hebrew posts/gets reliably?)
- Work with character images rather than text.
On that last point, I recently learned of a technique here on Daniweb which may be relevant here (I can't recall the details but should be able to rediscover the topic).
I'm sure you're not the first "non-Latin" to ask this question. Try Googling a query to see what others have done before.
Just a bunch of thoughts I'm afriad.
Airshow