unicode - international characters in Javascript -


i working on web application, transfer data server browser in xml.

since i'm danish, run problems characters æøå.

i know in html, use "æøå" æøå.

however, chars pass through javascript, black boxes "?" in them when using æøå, , "æøå" printed is.

i've made sure set utf-8, isn't helping much.

ideally, want work special characters (naturally).

the example isn't working included below:

<!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <html>   <head>     <meta http-equiv="content-type" content="text/html; charset=utf-8" />     <title>untitled document</title>         <script type="text/javascript" charset="utf-8">             alert("&aelig;&oslash;&aring;");             alert("æøå");          </script>     </head>     <body>     </body> </html> 

what doing wrong?


ok, grapefrukts answer, got working.

i needed data coming mysql server. since saving of files in utf-8 encoding solves problem static content, figure i'd include solution strings mysql server, pulled out using php:

utf8_encode($mystringhere)

just specifying utf-8 in header not enough. i'd bet haven't saved file utf-8. reasonably advanced text editor have option. try , i'm sure it'll work!


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -