Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Arabic Text in JS files


Message #1 by "Ahmed Abd El-Aziz Khudre" <aaz@h...> on Thu, 19 Apr 2001 11:07:43
Dear All,
I need to include Arabic string (Header and Footer) in many HTML pages on my site. I 
wrote a JScript functions named GetHeader() and GetFooter() that return the arabic 
text and I called the functions from all my pages as follows
<SCRIPT>
    document.write(GetHeader())
</SCRIPT>
Where GetHeader() is written as follows

function GetHeader()
{
    return "Some Arabic Text لص غربٌ"
}

If I write the function body in a JS file and call the function from an HTML file, 
the text looks rubbish on Win95 and Win 98 (non-Arabic). If I move the body of the 
function to the HTML file itself, everything works fine.
The files are saved as ANSI and I used the META tag with charset 1256 in the HTML 
file. Can any one help me?

Thanks

  Return to Index