Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
3
Help us understand the problem. What is going on with this article?
@FKbelm

Microsoft Edgeで同じJSを2回読み込むと文字化けする

More than 1 year has passed since last update.

Edgeでのみ発生する文字化け

index.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8"/>
</head>
<body>
        <p>読み込む: <script src="write.js"></script></p>
        <p>もういちど読み込む: <script src="write.js"></script></p>
        <p>もういちど読み込む: <script src="write.js"></script></p>
</body>
</html>
write.js
document.write("水金地火木土天海");

このようなごく簡単なhtmlとjsファイル(どちらもUTF-8)を用意して同じディレクトリに置きます。

Edgeで開きます。

image.png

化けます。

化け方の確認

image.png

image.png

Windows-1252として開いたら同じような化け方が確認できます。

3
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
FKbelm

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
3
Help us understand the problem. What is going on with this article?