dalei wrote:
Is there a way to have non-English letters and symbols, such as the
Greek letters or copyright sign, to appear in the box of alert()? Or is
the alert () also available to people with other writing systems? I
tried with such as δ. It didn't display.
This question is also for the prompt ().
Thanks.
alert('hello from St\xe8phane');
JS use UTF-16 encodding
In my example Hexa is used ( kind of UTF-8)
to insert a 'ê' (HTML entity : ê) in a JS string
you can write :
\xea \xEA \xea or \u00ea
You can go here (french page, but a carateres table stay a table)
http://www.miakinen.net/vrac/charsets
while overing a caractere,
in a separate block, are displayed correspondances
example : ß (beta)
- Unicode : U+00DF -> alert('f = \x00dfx');
- Hexa : DF -> alert('f = \xdfx');
© copyright : \a9 or \x00a9
2 square : alert('4\xb2 = 4 x 4 = 16'); -> \xb2 or \x00b2
alert('\xbf se habla espa\xf1ol ?');
--
Stephane Moriaux et son [moins] vieux Mac