20.3. html.entities — HTML 一般実体の定義¶
ソースコード: Lib/html/entities.py
このモジュールは 4 つの辞書、html5、name2codepoint、codepoint2name、および entitydefs を定義しています。
-
html.entities.html5¶ HTML5 名前付き文字参照 [1] と Unicode 文字とを対応付ける辞書です (例:
html5['gt;'] == '>')。末尾のセミコロンは名前に含まれますが (例:'gt;')、一部の名前はセミコロンなしでも標準で受け付けます: この場合名前は';'ありでもなしでも表されます。html.unescape()も参照してください。バージョン 3.3 で追加.
-
html.entities.entitydefs¶ 各 XHTML 1.0 実体定義と ISO Latin-1 における置換テキストとを対応付ける辞書です。
-
html.entities.name2codepoint¶ HTML 実体名と Unicode コードポイントとを対応付ける辞書です。
-
html.entities.codepoint2name¶ Unicode コードポイントと HTML 実体名とを対応付ける辞書です。
脚注
| [1] | https://www.w3.org/TR/html5/syntax.html#named-character-references を参照してください |
