LuckyLuke
LuckyLuke

Reputation: 49077

Characters outside of ASCII are not displayed properly

I am trying to display characters outside ASCII but it doesn't work. I only get scrambled characters. The JavaScript file should also be encoded in UTF-8, at least IntelliJ says so. What is missing or causing the error?

I have this in the index.html (which also has its charset set to UTF-8).

<script src="javascript/app.js" charset="utf-8"></script>

Just trying to output

console.log("Å");

I have this in the index.html file. It is an AngularJs application.

<meta charset="utf-8"/>

Upvotes: 2

Views: 568

Answers (1)

thSoft
thSoft

Reputation: 22660

Specify UTF-8 encoding in your HTML file. Here are some ways.

Check if your JavaScript file is really UTF-8-encoded (see also this question).

Upvotes: 1

Related Questions