Specials is a short
Unicode
Unicode, formally The Unicode Standard,The formal version reference is is an information technology Technical standard, standard for the consistent character encoding, encoding, representation, and handling of Character (computing), text expre ...
block of characters allocated at the very end of the
Basic Multilingual Plane
In the Unicode standard, a plane is a continuous group of 65,536 (216) code points. There are 17 planes, identified by the numbers 0 to 16, which corresponds with the possible values 00–1016 of the first two positions in six position hexadecimal ...
, at U+FFF0–FFFF. Of these 16 code points, five have been assigned since Unicode 3.0:
*, marks start of
annotated text
*, marks start of annotating character(s)
*, marks end of annotation block
*
, placeholder in the text for another unspecified object, for example in a
compound document
In computing, a compound document is a document that “combines multiple document formats, either by reference, by inclusion, or both.” Compound documents are often produced using word processing software, and may include text and non-text ele ...
.
* used to replace an unknown, unrecognized, or unrepresentable character
* not a character.
* not a character.
FFFE and FFFF are not unassigned in the usual sense, but
guaranteed not to be Unicode characters at all. They can be used to guess a text's encoding scheme, since any text containing these is by definition not a correctly encoded Unicode text. Unicode's character can be inserted at the beginning of a Unicode text to signal its
endianness
In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most sig ...
: 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.
Replacement character
![Replacement character](https://upload.wikimedia.org/wikipedia/commons/7/7f/Replacement_character.svg)
The replacement character � (often displayed as a black
rhombus
In plane Euclidean geometry, a rhombus (plural rhombi or rhombuses) is a quadrilateral whose four sides all have the same length. Another name is equilateral quadrilateral, since equilateral means that all of its sides are equal in length. The ...
with a white question mark) is a symbol found in the
Unicode
Unicode, formally The Unicode Standard,The formal version reference is is an information technology Technical standard, standard for the consistent character encoding, encoding, representation, and handling of Character (computing), text expre ...
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 a correct symbol.
It is usually seen when the data is invalid and does not match any character:
Consider a text file containing the German word (meaning 'for') in the
ISO-8859-1
ISO/IEC 8859-1:1998, ''Information technology — 8-bit single-byte coded graphic character sets — Part 1: Latin alphabet No. 1'', is part of the ISO/IEC 8859 series of ASCII-based standard character encodings, first edition published in 1 ...
encoding (
0x66 0xFC 0x72
). This file is now opened with a text editor that assumes the input is
UTF-8
UTF-8 is a variable-width encoding, variable-length character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode'' (or ''Universal Coded Character Set'') ''Transformation Format 8-bit'' ...
. The first and last byte are valid UTF-8 encodings of ASCII, but the middle byte (
0xFC
) is not a valid byte in UTF-8. Therefore, a text editor could replace this byte with the replacement character symbol to produce a valid string of Unicode
code point
In character encoding terminology, a code point, codepoint or code position is a numerical value that maps to a specific character. Code points usually represent a single grapheme—usually a letter, digit, punctuation mark, or whitespace—but ...
s. The whole string now displays like this: "f�r".
A poorly implemented text editor might save the replacement in UTF-8 form; the text file data will then look like this:
0x66 0xEF 0xBF 0xBD 0x72
, which will be displayed in ISO-8859-1 as "f�r" (this is called
mojibake
Mojibake ( ja, 文字化け; , "character transformation") is the garbled text that is the result of text being decoded using an unintended character encoding. The result is a systematic replacement of symbols with completely unrelated ones, ofte ...
). Since the replacement is the same for all errors this makes it impossible to recover the original character. A better (but harder to implement) design is to preserve the original bytes, including the error, 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 the error indicator to the user.
At one time the replacement character was often used when there was no glyph available in a font for that character. 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
), sometimes called a '
tofu
Tofu (), also known as bean curd in English, is a food prepared by coagulating soy milk and then pressing the resulting curds into solid white blocks of varying softness; it can be ''silken'', ''soft'', ''firm'', ''extra firm'' or ''super firm ...
' (this browser displays ). There is no Unicode code point for this symbol.
Thus the replacement character is now only seen for encoding errors, such as invalid UTF-8. Some software attempts to hide this by translating the bytes of invalid UTF-8 to matching characters in
Windows-1252
Windows-1252 or CP-1252 ( code page 1252) is a single-byte character encoding of the Latin alphabet, used by default in the legacy components of Microsoft Windows for English and many European languages including Spanish, French, and German.
It ...
(since that is the most likely 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
*
Unicode control characters
Many Unicode characters are used to control the interpretation or display of text, but these characters themselves have no visual or spatial representation. For example, the null character ( ) is used in C-programming application environments ...
References
{{Unicode navigation
Specials