يو تي اف-16
| MIME / IANA |
• text/plain;charset=UTF-16 • text/plain; charset=utf-16le • text/plain; charset=utf-16be |
|---|---|
| اللغات |
عالمي / دولي |
| المعايير |
معيار يونيكود (Unicode Standard) |
| التصنيف | |
| يرمز |
| مأخوذ عن |
UCS-2 |
|---|---|
UTF-16 (صيغة تحويل يونيكود ذات 16 بت) هي إحدى طرائق ترميز المحارف التي تدعم جميع نقاط الترميز البالغ عددها 1,112,064 نقطة صالحة في معيار يونيكود.[1] يُعد هذا الترميز ذا طول متغير، إذ تُمثّل نقاط الترميز باستخدام وحدة ترميز واحدة أو وحدتين، يبلغ طول كل منهما 16 بت.
نشأ ترميز UTF-16 من صيغة ترميز سابقة ثابتة الطول، كانت تعتمد على 16 بت، وأصبحت تُعرف لاحقاً باسم UCS-2 (مجموعة المحارف العالمية ذات البايتين).[2][3] جاء تطوير UTF-16 بعدما اتضح أن تمثيل أكثر من 65,536 نقطة ترميز (أي 216) يتطلب آلية تتجاوز حدود الترميز ذي 16 بت.[4] تشمل هذه المحارف معظم الرموز التعبيرية، إلى جانب عدد من المحارف المهمة في اللغات الصينية واليابانية والكورية، ولا سيما المستخدمة في كتابة أسماء الأشخاص والأماكن.[5]
يُستخدم ترميز UTF-16 في واجهة برمجة تطبيقات ويندوز (Windows API)، وفي العديد من بيئات البرمجة، مثل لغة جافا وكيو تي. وقد أدى اعتماد UTF-16 على وحدات ترميز متغيرة الطول، إلى جانب كون معظم المحارف تُمثّل بوحدات ذات طول ثابت، مما يجعل اختبار حالات الترميز المتغير نادراً، إلى ظهور العديد من الأخطاء البرمجية، بما في ذلك أخطاء في نظام ويندوز نفسه.[6]
يُعد UTF-16 ترميز المحارف الوحيد الذي لا يزال مسموحاً باستخدامه على الويب، رغم عدم توافقه مع معيار أسكي ذي 8 بتات.[7] لم يحقق UTF-16 انتشاراً يُذكر على الويب، إذ لا تتجاوز نسبة صفحات الويب العامة التي تعلن استخدامه 0.003%، وحتى هذه الصفحات يُرجح أنها تستخدم أيضاً ترميز UTF-8.[8] وفي المقابل، فرض UTF-8 هيمنته على الويب منذ سنوات، وبلغت نسبة استخدامه 99.1% من إجمالي صفحات الويب بحلول عام 2026.[9] تعتبر مجموعة عمل تقنية تطبيقات النص التشعبي على الويب (WHATWG) أن UTF-8 هو «الترميز الإلزامي لجميع أنواع النصوص» على الويب، كما توصي بعدم استخدام UTF-16 في تطبيقات المتصفحات لأسباب تتعلق بالأمان.[10]

- ↑ "Conformance". The Unicode Standard (ط. 6.0). Mountain View, California, US: The Unicode Consortium. 3.9 Unicode Encoding Forms. ISBN:978-1-936213-01-6.
Each encoding form maps the Unicode code points U+0000..U+D7FF and U+E000..U+10FFFF
- ↑ "C.2 Encoding Forms in ISO/IEC 10646" (PDF). The Unicode Standard, version 6.0. Mountain View, CA: Unicode Consortium. فبراير 2011. ص. 573. ISBN:978-1-936213-01-6.
[...] the term UCS-2 should now be considered obsolete. It no longer refers to an encoding form in either 10646 or the Unicode Standard.
- ↑ "FAQ: What is the difference between UCS-2 and UTF-16?". unicode.org. مؤرشف من الأصل في 2003-08-18. اطلع عليه بتاريخ 2024-03-19.
UCS-2 is obsolete terminology which refers to a Unicode implementation up to Unicode 1.1 [...]
- ↑ "What is UTF-16?". The Unicode Consortium. Unicode, Inc. مؤرشف من الأصل في 2026-10-24. اطلع عليه بتاريخ 2023-01-07.
UTF-16 uses a single 16-bit code unit to encode over 60,000 of the most common characters in Unicode
- ↑ Lunde, Ken (9 Jan 2022). "2022 Top Ten List: Why Support Beyond-BMP Code Points?". Medium (بالإنجليزية). Archived from the original on 2026-07-17. Retrieved 2024-01-07.
I first came up with the idea for this Top Ten List over 10 years ago, which was prompted by some environments that still supported only BMP code points. The idea, of course, was to motivate the developers of such environments to support code points beyond the BMP by providing an enumerated list of reasons to do so. And yes, there are still some environments that support only BMP code points, such as the VivaDesigner app.
- ↑ "Should UTF-16 be considered harmful?". Software Engineering Stack Exchange (بالإنجليزية). Archived from the original on 2026-04-23. Retrieved 2024-11-20.
File names editing in Window dialogs in broken (delete required 2 presses on backspace)
- ↑ "HTML Living Standard". w3.org. 10 يونيو 2020. مؤرشف من الأصل في 2020-09-08. اطلع عليه بتاريخ 2020-06-15.
UTF-16 encodings are the only encodings that this specification needs to treat as not being ASCII-compatible encodings.
- ↑ "Usage Statistics and Market Share of UTF-16 for Websites, November 2025". w3techs.com. اطلع عليه بتاريخ 2025-11-20.
- ↑ "Usage Statistics and Market Share of UTF-8 for Websites, September 2026". w3techs.com. اطلع عليه بتاريخ 2026-09-10.
- ↑ "Encoding Standard". encoding.spec.whatwg.org (بالإنجليزية). Archived from the original on 2026-10-31. Retrieved 2018-10-22.
The UTF-8 encoding is the most appropriate encoding for interchange of Unicode, the universal coded character set. Therefore for new protocols and formats, as well as existing formats deployed in new contexts, this specification requires (and defines) the UTF-8 encoding. [..] The problems outlined here go away when exclusively using UTF-8, which is one of the many reasons that UTF-8 is now the mandatory encoding for all text things on the Web.