Specials (Unicode block) explained

Blockname:Specials
Rangestart:FFF0
Rangeend:FFFF
Script1:Common
1 0 0:1
2 1:1
3 0:3
Nonchar:2
Note:[1] [2]

Specials is a short Unicode block of characters allocated at the very end of the Basic Multilingual Plane, at U+FFF0 - FFFF. Of these 16 code points, five have been assigned since Unicode 3.0:

, placeholder in the text for another unspecified object, for example in a compound document.

and are noncharacters, meaning they are reserved but do not cause ill-formed Unicode text. Versions of the Unicode standard from 3.1.0 to 6.3.0 claimed that these characters should never be interchanged, leading some applications to use them to guess text encoding by interpreting the presence of either as a sign that the text is not Unicode. However, Corrigendum #9 later specified that noncharacters are not illegal and so this method of checking text encoding is incorrect.[3]

Unicode's character can be inserted at the beginning of a Unicode text to signal its endianness: a program reading such a text and encountering 0xFFFE would then know that it should switch the byte order for all the following characters.

Its block name in Unicode 1.0 was Special.[4]

Replacement character

The replacement character � (often displayed as a black rhombus with a white question mark) is a symbol found in the Unicode standard at code point U+FFFD in the Specials table. It is used to indicate problems when a system is unable to render a stream of data to correct symbols.[5]

As an example, a text file encoded in ISO 8859-1 containing the German word German: für contains the bytes 0x66 0xFC 0x72. If this file is opened with a text editor that assumes the input is UTF-8, the first and third bytes are valid UTF-8 encodings of ASCII, but the second byte (0xFC) is not valid in UTF-8. The text editor could replace this byte with the replacement character to produce a valid string of Unicode code points for display, so the user sees "f�r".

A poorly implemented text editor might write out the replacement character when the user saves the file; the data in the file will then become 0x66 0xEF 0xBF 0xBD 0x72. If the file is re-opened using ISO 8859-1, it will display "f�r" (this is called mojibake). Since the replacement is the same for all errors it is impossible to recover the original character. A design that is better (but harder to implement) is to preserve the original bytes, including any errors, and only convert to the replacement when displaying the text. This will allow the text editor to save the original byte sequence, while still showing an error indication to the user.

At one time the replacement character was often used when there was no glyph available in a font for that character, as in font substitution. However, most modern text rendering systems instead use a font's character, which in most cases is an empty box, or "?" or "X" in a box[6] (this browser displays �), sometimes called a 'tofu'. There is no Unicode code point for this symbol.

Thus the replacement character is now only seen for encoding errors. Some software programs translate invalid UTF-8 bytes to matching characters in Windows-1252 (since that is the most common source of these errors), so that the replacement character is never seen.

Unicode chart

History

The following Unicode-related documents record the purpose and process of defining specific characters in the Specials block:

See also

References

Notes and References

  1. Web site: Unicode character database. The Unicode Standard. 2023-07-26.
  2. Web site: Enumerated Versions of The Unicode Standard. The Unicode Standard. 2023-07-26.
  3. Web site: Corrigendum #9: Clarification About Noncharacters. The Unicode Standard. 2023-06-07. live . https://web.archive.org/web/20230610160203/http://www.unicode.org/versions/corrigendum9.html . Jun 10, 2023.
  4. Web site: 3.8: Block-by-Block Charts . The Unicode Standard . Version 1.0 . . 2020-09-30 . 2021-02-11 . https://web.archive.org/web/20210211080017/https://www.unicode.org/versions/Unicode1.0.0/CodeCharts2.pdf . live .
  5. Web site: Wichary . Marcin . When fonts fall . September 29, 2020 . Figma . 6 June 2021 . 13 June 2021 . https://web.archive.org/web/20210613175106/https://www.figma.com/blog/when-fonts-fall/ . live .
  6. Web site: Recommendations for OpenType Fonts (OpenType 1.7) - Typography . Microsoft Learn . 18 October 2020 . en-us . 19 October 2020 . https://web.archive.org/web/20201019135242/https://docs.microsoft.com/en-us/typography/opentype/otspec170/recom#shape-of-notdef-glyph . live .