BOM

BOM

Encoding & Standards

Byte Order Mark (U+FEFF) ที่วางไว้ที่ต้นไฟล์ข้อความเพื่อระบุลำดับไบต์ (endianness) ในการเข้ารหัส UTF-16/UTF-32

The BOM is a special Unicode character used to signal the byte order of a text stream. In UTF-16, it distinguishes between little-endian (FF FE) and big-endian (FE FF) formats.

In UTF-8, a BOM (EF BB BF) is sometimes added but is not recommended — it can cause issues with scripts, JSON parsing, and Unix tools that don't expect it. Many text editors add a UTF-8 BOM by default, which can lead to subtle bugs.

Modern best practice: use UTF-8 without BOM for web content and data files.

คำที่เกี่ยวข้อง

UTF-16 UTF-16
การเข้ารหัส Unicode แบบความกว้างผันแปร ใช้ 2 หรือ 4 ไบต์ต่ออักขระ ใช้ภายในโดย JavaScript, Java และ Windows
UTF-32 UTF-32
การเข้ารหัส Unicode แบบความกว้างคงที่ ใช้ 4 ไบต์ต่ออักขระพอดี ทำให้แมปโค้ดพอยท์ได้โดยตรงแต่ใช้พื้นที่มากกว่า
UTF-8 UTF-8
การเข้ารหัส Unicode แบบความกว้างผันแปร ใช้ 1 ถึง 4 ไบต์ต่ออักขระ เป็นมาตรฐานหลักบนเว็บ (ใช้โดยเว็บไซต์กว่า 98%)

เครื่องมือที่เกี่ยวข้อง

🔢 ค้นหา Unicode ค้นหา Unicode
ป้อนจุดรหัสเช่น U+1F600 และรับ emoji, รายละเอียดการเข้ารหัส, ไบต์ UTF-8/16 และ HTML entities