コンテンツにスキップ

バイト順マーク

出典: フリー百科事典『ウィキペディア(Wikipedia)』

 (: byte order mark) BOMUnicodeUnicode使

[]


Unicode使[1]

[]


UnicodeASCIIISO-8859Shift_JISEUC-JP使UnicodeUnicodeUTF-16UTF-322

使[]


BOM使使Unicode"XML Media Types" (RFC 3023) XMLUTF-16BOMXMLBOMxml<?xml encoding="..."?>[2]JSONBOM[3]

UTF-8ASCIIBOMUnicodeUTF-8BOM[4]BOM

BOMUnicodeUnicodeBOMUTF-70xFE"þ"0xFF"ÿ"ISO/IEC 8859-12Unicode

各符号化形式(符号化スキーム)ごとのバイト順マーク[編集]

符号化形式(符号化スキーム) エンディアンの区別 バイト順マーク (BOM)
UTF-8 0xEF 0xBB 0xBF
UTF-16 BE 0xFE 0xFF
LE 0xFF 0xFE
UTF-16BE (付加は認められない)
UTF-16LE (付加は認められない)
UTF-32 BE 0x00 0x00 0xFE 0xFF
LE 0xFF 0xFE 0x00 0x00
UTF-32BE (付加は認められない)
UTF-32LE (付加は認められない)
UTF-7 0x2B 0x2F 0x76 ※ (※は次のバイトの値によって異なり、0x38、0x39、0x2B、0x2Fのいずれかがくる)

関連項目[編集]

ゼロ幅ノーブレークスペース - U+FEFF の文字

脚注[編集]

  1. ^ Unicode FAQ”. 2012年7月25日閲覧。
  2. ^ RFC [https://datatracker.ietf.org/doc/html/rfc3023 3023 - XML Media Types]”. 2012年7月25日閲覧。
  3. ^ 8.1. Character Encoding - STD 90 - The JavaScript Object Notation (JSON) Data Interchange Format
  4. ^ the Unicode Consortium, Julie D. Allen (2007). The Unicode Standard -- Version 5.0. p. 36. ISBN 0-321-48091-0. http://www.unicode.org/versions/Unicode5.0.0/ch02.pdf. "(from Chapter 2:General Structure) Use of a BOM is neither required nor recommended for UTF-8, but may be encountered in contexts where UTF-8 data is converted from other encoding forms that use a BOM or where the BOM is used as a UTF-8 signature"