简体   繁体   中英

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"/>

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 ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM