本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #2771

charset

できること

このスキルは、HTMLページが文書の先頭近くで文字エンコーディングを宣言しているかを確認します。どの言語のテキストも正しく表示させたい開発者向けです。

使う場面

  • ✓アクセント記号や記号が崩れた文字化けが表示されるとき。
  • ✓新しいHTMLのテンプレートを作るとき。
  • ✓ページのheadセクションが正しく設定されているか確認するとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/charset/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/charset/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“特殊な文字が正しく表示されるように、私のページのテンプレートが早い段階でUTF-8を宣言しているか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、ページのheadの最初の要素として、文書の最初の1024バイト以内に、UTF-8に設定したmeta charsetタグを追加します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Declare UTF-8 character encoding

Missing or incorrect charset causes mojibake (garbled text), broken special characters, and security vulnerabilities from character encoding attacks.

Quick Reference

  • Add <meta charset="UTF-8"> as the first element in <head>
  • Must appear within the first 1024 bytes of the document
  • UTF-8 supports all languages and special characters

Check

Verify that this HTML document declares UTF-8 character encoding in the head section and that it's positioned early in the document.

Fix

Add <meta charset="UTF-8"> as the first meta tag in the head section of the HTML document.

Explain

Explain why UTF-8 character encoding is essential for international content support and preventing character display issues.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Declare UTF-8 character encoding. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/html/charset

よくある質問

文字化けとは何ですか?

文字が誤ったエンコーディングで読まれたときに現れる、崩れたテキストを指す言葉だと、このスキルは説明しています。

宣言はなぜ早い段階にある必要がありますか?

文書の最初の1024バイト以内に現れる必要があると、このスキルは説明しています。

UTF-8はすべての言語に対応していますか?

はい。UTF-8はすべての言語と特殊な文字に対応していると、このスキルは説明しています。

詳細

作者による元の説明

Use when reviewing templates, rendered HTML, or shared components related to Declare UTF-8 character encoding. Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2771
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル