Jump to content

Problem with Danish characters "æ, ø, å"


Mixware

Recommended Posts

 

I have the following simplified code.

The alert is shown with the correct "ø".

 

If I instead place myFunction in an external js, the alert is displayed with the character "ø" as a question mark.

 

I have tried without success to

 

<script src = "my.js" charset = 'utf-8'> </ script>

 

How can I get it to work also with myFunction in an external js.

 

 

<!DOCTYPE html><html><head><meta charset="UTF-8"><script>function myFunction() { alert("Søren");}</script></head><body><button onclick="myFunction()">Click</button></body></html>​

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...