سانچہ:UTF-16
0000
استعمال
ترمیم{{UTF-16|code point|base=|surrogatesonly=}}
Takes a single Unicode code point and returns the UTF-16 double byte encoding.
Code Point - a Unicode code point scalar value, without the "U+". This template will not properly flag all code points outside of the UTF-32 code space, i.e. any input longer than 8 digits.
Base - template returns UTF-16 double bytes in upper case hexadecimal by default. Base = Dec, Decimal, or 10 outputs decimal values for UTF-16 bytes. Base = LChex, LC16, Lower Case Hex, or Lower Case 16 will output hex codes in lower case.
Surrogatesonly - when yes, template will only return values for code points in the surrogate planes, i.e. those code points where the UTF-16 encoding is different than the scalar value ( > U+FFFF ).
All inputs are case insensitive.
مثالیں
ترمیم- {{UTF-16|110c15}} =
- {{UTF-16|1bc15}} =
- {{UTF-16|dc15}} =
- {{UTF-16|7a5}} =
- {{UTF-16|7a5|base=LChex}} =
- {{UTF-16|7a5|base=dec}} =
- {{UTF-16|7a5|surrogatesonly=yes}} =
Note that U+110C15 is too large to be a legal Unicode code point, while U+DC15 is a surrogate code point, which is not legal in isolation, and does not have a UTF-16 value.
تکنیکی
ترمیمThis template makes use of the following sub-templates:
{{UTF-16/main}}
- Returns the scalar value as 4 digit hex if less than U+10000, and valid Unicode code points as surrogates for larger values.
This template is dependent on the following transcluded templates:
{{hex2dec}}
{{hexadecimal}}
{{Str rightc}}
and the magic words / parser functions padleft:, #ifexpr:, #expr:, #switch:, uc:, and lc:.
مزید دیکھیے
ترمیماوپر دی گئی دستاویز صفحہ سانچہ:UTF-16/دستاویز سے شامل کی گئی ہے۔ (ترمیم | تاریخچہ) صارفین سانچہ کے تختہ مشق (تخلیق | آئینہ) اور ثابتات (تخلیق) میں تجربات کرسکتے ہیں۔ براہ کرم /دستاویز کے ذیلی صفحہ پر زمرہ جات شامل فرمائیں۔ اس سانچہ کے ذیلی صفحات۔ |