Substitute character
In computer data, a substitute character (␚) is a control character that is used to pad transmitted data in order to send it in blocks of fixed size, or to stand in place of a character that is recognized to be invalid, erroneous or unrepresentable on a given device. It is also used as an escape sequence in some programming languages.
In the
Uses
End of file
Historically, under
In
COPY CON: TYPEDTXT.TXT
).
While no longer technically required to indicate the end of a file, as of 2017, many text editors[
Some programming languages (e.g. Visual Basic) will not read past a "soft" EOF when using the built-in text file reading primitives (INPUT, LINE INPUT etc.),[citation needed] and alternate methods must be adopted, e.g. opening the file in binary mode or using the File System Object to progress beyond it.
Character 26 was used to mark "End of file" even though ASCII calls this character Substitute, and has other characters to indicate "End of file". Number 28 which is called "
Other uses
In
The Unicode Security Considerations report[12] recommends this character as a safe replacement for unmappable characters during character set conversion.
In many GUIs and applications, Control+Z (⌘ Command+Z on
Representation
ASCII and Unicode representation of "substitute":
- Octal code: 32
- Decimal code: 26
- Hexadecimal code: 1A, U+001A
- Mnemonic symbol: SUB
- Binary value: 11010
See also
- ISO 646)
- U+FFFD(Unicode replacement character �)
- Access key
- Control-C
- Control-G
- Control-V
- Control-X
- Control-\
- Keyboard shortcut
- List of file signatures
- .notdef, a symbol (sometimes called by the slang term tofu) used to represent a missing character
- Noto fonts, a Google project to eliminate missing characters
References
- ^ "Keyboard shortcuts for Windows". Microsoft Support. Microsoft. Retrieved 2012-06-02.
- ^ "Table of IO Device Characteristics - Console or Teletypewriters". PDP-6 Multiprogramming System Manual (PDF). Maynard, Massachusetts, USA: Digital Equipment Corporation (DEC). 1965. p. 43. DEC-6-0-EX-SYS-UM-IP-PRE00. Archived (PDF) from the original on 2014-07-14. Retrieved 2014-07-10. (1+84+10 pages)
- ^ "5.1.1.1. Device Dependent Functions - Data Modes - Full-Duplex Software A(ASCII) and AL(ASCII Line)". PDP-10 Reference Handbook: Communicating with the Monitor - Time-Sharing Monitors (PDF). Vol. 3. Digital Equipment Corporation (DEC). 1969. pp. 5-3 – 5-6 [5-5 (431)]. Archived (PDF) from the original on 2011-11-15. Retrieved 2014-07-10. (207 pages)
- ^ Elliott, John C. (1998). "CP/M 1.4 disc formats". Archived from the original on 2020-11-14. Retrieved 2021-11-18.
- ^ Elliott, John C. (1998). "CP/M 2.2 disc formats". Archived from the original on 2020-11-05. Retrieved 2021-11-18.
- ) are ignored, however, and the end of file condition returned by CP/M is used to terminate read operations. [...] (56 pages)
- end-of-file marker is possible because CONTROL-z is seldom used as data in ASCII files. In a non-ASCII file, however, CONTROL-Z is just as likely to occur as any other character. Therefore, it cannot be used as the end-of-file marker. CP/M uses a different method to mark the end of a non-ASCII file. CP/M assumes it has reached the end of the file when it has read the last record (basic unit of disk space) allocated to the file. The disk directory entry for each file contains a list of the disk records allocated to that file. This method relies on the size of the file, rather than its content, to locate the end of the file. [...] [1][2]
- ^ Elliott, John C. (1998). "CP/M 3.1 disc formats". Archived from the original on 2021-10-26. Retrieved 2021-11-18.
- ^ Elliott, John C. (1998). "CP/M 4.1 disc formats". Archived from the original on 2020-11-05. Retrieved 2021-11-18.
- ^ CSV-1203 format specification Archived 2016-05-16 at the Portuguese Web Archive
- ^ "Quick Reference: Unix Commands". IT Connect. University of Washington. Retrieved 2012-06-02.
- ^ Unicode Security Considerations report