[thelist] French characters in JavaScript

Dmitry Yeskin yeskin at webstylestudio.com
Tue Feb 17 10:49:26 CST 2004


Hello, Steve!

> I'm trying to remember how to do French characters (éâÉ etc.) in a
> JavaScript alert. Can anyone help me out with this ?

>     <script type="text/javascript" language="Javascript">
>         alert('éîåáèÈÂ');
>     </script>

> Escaping them doesn't work - neither does using the entity encoding --
> I think it's Unicode - but them I end up with tons of problems with PHP.

It's a bad way to use the international characters in the javascript.
I know it maybe strange but some browsers like Netscape 4.6 show the
neverending error messages popups that killing the browser. Only one
way to show the international messages that will work on all browsers
in the world is the next:

<script type="text/javascript" language="Javascript">
alert(document.messages_form.my_message1.value);
</script>

<form name="messages_form">
<input type="hidden" name="my_message1" value=" Your International Text Here ">
</form>

With best regards,
Dmitry Yeskin
CEO of "Web Style" Studio, LLC
yeskin at webstylestudio.com
http://www.webstylestudio.com
+380-572-305250



More information about the thelist mailing list