BOM

BOM

Encoding & Standards

علامة ترتيب البايت (U+FEFF) توضع في بداية الملف النصي للإشارة إلى ترتيب البايت (الإنهاء) في ترميزات 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 واحصل على الرمز التعبيري وتفاصيل الترميز وبايتات UTF-8/16 وكيانات HTML.