Knowledge (XXG)

Substitute character

Source 📝

220:
is often termed a "soft" EOF, as it does not necessarily represent the physical end of the file, but is more a marker indicating that "there is no useful data beyond this point". In reality, more data may exist beyond this character up to the actual end of the data in the file system, thus it can be used to hide file content when the file is entered at the console or opened in editors. Many file format standards (e.g.
779:
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.
778:
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
219:
While no longer technically required to indicate the end of a file, as of 2017, many text editors and program languages still support this convention, or can be configured to insert this character at the end of a file when editing, or at least properly cope with them in text files. In such cases, it
45:
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
259:) will not read past a "soft" EOF when using the built-in text file reading primitives (INPUT, LINE INPUT etc.), and alternate methods must be adopted, e.g. opening the file in binary mode or using the File System Object to progress beyond it. 773:
character in the file after the last data character. If the file contains an exact multiple of 128 characters, in which case adding the CONTROL-Z would waste 127 characters, CP/M does not do so. Use of the CONTROL-Z character as the
154:
could not record the exact file size by itself; files were allocated in extents (records) of a fixed size, typically leaving some allocated but unused space at the end of each file. This extra space was filled with
556: 262:
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 "
205:, and their various derivatives, the SUB character was also used to indicate the end of a character stream, and thereby used to terminate user input in an interactive 686: 308:) signal, which generally causes the process to suspend its execution. The user can later continue the process execution by using the "foreground" command ( 595: 327:
The Unicode Security Considerations report recommends this character as a safe replacement for unmappable characters during character set conversion.
543: 782: 784: 749: 249: 591: 552: 178:) did support byte-granular files, so this was no longer a requirement, but it remained as a convention (especially for 800: 919: 826: 651: 625: 228:) include the SUB character in their headers to perform precisely this function. Some modern text file formats (e.g. 673: 221: 870: 99:(�, U+FFFD) be used instead to represent un-decodable inputs, when the output encoding is compatible with it. 849: 717:) are ignored, however, and the end of file condition returned by CP/M is used to terminate read operations. 232:) still recommend a trailing EOF character to be appended as the last character in the file. However, typing 582: 474: 423: 904: 737: 354:
the last action. In many applications, earlier actions than the last one can also be undone by pressing
96: 581:"5.1.1.1. Device Dependent Functions - Data Modes - Full-Duplex Software A(ASCII) and AL(ASCII Line)". 209:
window (and as such, often used to finish console input redirection, e.g. as instigated by the command
166:) characters under CP/M. The extended CP/M filesystems used by CP/M 3 and higher (and derivatives like 741: 47: 54: 775: 315: 297: 292: 745: 469: 371: 301: 279: 245: 65: 42: 731: 682: 139: 286:
the currently executing interactive process. The suspended process can then be resumed in
167: 862: 263: 171: 913: 889: 256: 206: 584:
PDP-10 Reference Handbook: Communicating with the Monitor - Time-Sharing Monitors
379: 163: 147: 113: 69: 61: 713:
read operation. Control-Z characters embedded within machine code files (e.g.,
491: 464: 439: 375: 151: 770: 706: 522: 459: 454: 449: 444: 320: 310: 179: 822: 796: 647: 621: 714: 514: 229: 175: 480: 433: 427: 394: 305: 283: 252:
of those systems use the character to denote the actual end of a file.
131: 127: 92: 304:, the currently running foreground process is sent a "terminal stop" ( 202: 198: 194: 190: 846: 24: 542:"Table of IO Device Characteristics - Console or Teletypewriters". 766: 702: 390: 347: 123: 119: 762: 710: 351: 275: 186: 143: 135: 31: 20: 241: 225: 278:-like operating systems, this character is typically used in 95:
inherits this character from ASCII, but recommends that the
76: 709:
character (1AH) or a real end of file, returned by the
290:(interactive) mode, or be made to resume execution in 240:
does not embed an EOF character into a file in either
30:"Ctrl+Z" redirects here. For the "undo" function, see 19:"␦" redirects here. For the Arabic question mark, see 555:(DEC). 1965. p. 43. DEC-6-0-EX-SYS-UM-IP-PRE00. 210: 730:Hogan, Thom (1982). "3. CP/M Transient Commands". 494:, a Google project to eliminate missing characters 23:. For the rhetorical question or irony mark, see 484:, a symbol (sometimes called by the slang term 681:(1 ed.). Pacific Grove, California, USA: 57:, this character is encoded by the number 26 ( 374:sequences chosen by the program designers at 182:) in order to ensure backward compatibility. 8: 733:Osborne CP/M User Guide - For All CP/M Users 266:" has also been used for similar purposes. 146:) it was necessary to explicitly mark the 736:(2 ed.). Berkeley, California, USA: 852:2016-05-16 at the Portuguese Web Archive 672:"2. Operating System Call Conventions". 488:) used to represent a missing character 367: 363: 359: 355: 343: 339: 335: 331: 237: 233: 75: 70: 506: 890:Unicode Security Considerations report 7: 545:PDP-6 Multiprogramming System Manual 84:, often documented by convention as 594:(DEC). 1969. pp. 5-3 – 5-6 . 300:. When entered by a user at their 14: 436:(Unicode replacement character �) 255:Some programming languages (e.g. 80:keys are pressed simultaneously ( 863:"Quick Reference: Unix Commands" 515:"Keyboard shortcuts for Windows" 397:representation of "substitute": 829:from the original on 2020-11-05 803:from the original on 2021-10-26 692:from the original on 2020-02-28 654:from the original on 2020-11-05 628:from the original on 2020-11-14 601:from the original on 2011-11-15 562:from the original on 2014-07-14 551:. Maynard, Massachusetts, USA: 330:In many GUIs and applications, 16:Non-printing computer data item 1: 847:CSV-1203 format specification 592:Digital Equipment Corporation 553:Digital Equipment Corporation 407:Hexadecimal code: 1A, U+001A 68:transmit this code when the 936: 111: 29: 18: 821:Elliott, John C. (1998). 795:Elliott, John C. (1998). 646:Elliott, John C. (1998). 620:Elliott, John C. (1998). 282:as a way for the user to 150:(EOF) because the native 871:University of Washington 675:CP/M 2.0 Interface Guide 370:was one of a handful of 823:"CP/M 4.1 disc formats" 797:"CP/M 3.1 disc formats" 648:"CP/M 2.2 disc formats" 622:"CP/M 1.4 disc formats" 475:List of file signatures 424:C0 and C1 control codes 905:Federal Standard 1037C 738:A. Osborne/McGraw-Hill 142:(and derivatives like 705:file is denoted by a 97:replacement character 48:programming languages 765:marks the end of an 410:Mnemonic symbol: SUB 118:Historically, under 39:substitute character 37:In computer data, a 685:. 1979. p. 5. 413:Binary value: 11010 55:ASCII character set 920:Control characters 776:end-of-file marker 769:file by placing a 134:, and in early PC 519:Microsoft Support 470:Keyboard shortcut 350:) can be used to 302:computer terminal 214:CON: TYPEDTXT.TXT 140:operating systems 43:control character 927: 892: 887: 881: 880: 878: 877: 859: 853: 844: 838: 837: 835: 834: 818: 812: 811: 809: 808: 792: 786: 781: 759: 758: 727: 721: 719: 698: 697: 691: 683:Digital Research 680: 669: 663: 662: 660: 659: 643: 637: 636: 634: 633: 617: 611: 609: 607: 606: 600: 589: 578: 572: 570: 568: 567: 561: 550: 539: 533: 532: 530: 529: 511: 483: 404:Decimal code: 26 362:multiple times. 323: 313: 215: 213: 158: 88: 83: 60: 935: 934: 930: 929: 928: 926: 925: 924: 910: 909: 901: 899:Further reading 896: 895: 888: 884: 875: 873: 861: 860: 856: 845: 841: 832: 830: 820: 819: 815: 806: 804: 794: 793: 789: 756: 754: 752: 729: 728: 724: 695: 693: 689: 678: 671: 670: 666: 657: 655: 645: 644: 640: 631: 629: 619: 618: 614: 604: 602: 598: 590:. Vol. 3. 587: 580: 579: 575: 571:(1+84+10 pages) 565: 563: 559: 548: 541: 540: 536: 527: 525: 513: 512: 508: 503: 479: 420: 388: 369: 365: 361: 357: 345: 341: 337: 333: 319: 309: 272: 239: 235: 211: 168:Concurrent CP/M 161: 156: 116: 110: 105: 86: 81: 79: 72: 58: 35: 28: 17: 12: 11: 5: 933: 931: 923: 922: 912: 911: 908: 907: 900: 897: 894: 893: 882: 854: 839: 813: 787: 750: 722: 701:The end of an 664: 638: 612: 573: 534: 505: 504: 502: 499: 498: 497: 496: 495: 477: 472: 467: 462: 457: 452: 447: 442: 437: 431: 419: 416: 415: 414: 411: 408: 405: 402: 401:Octal code: 32 387: 386:Representation 384: 271: 268: 264:File Separator 172:Concurrent DOS 159: 112:Main article: 109: 106: 104: 101: 15: 13: 10: 9: 6: 4: 3: 2: 932: 921: 918: 917: 915: 906: 903: 902: 898: 891: 886: 883: 872: 868: 864: 858: 855: 851: 848: 843: 840: 828: 824: 817: 814: 802: 798: 791: 788: 785: 783: 780: 777: 772: 768: 764: 753: 751:0-931988-82-9 747: 743: 739: 735: 734: 726: 723: 718: 716: 712: 708: 704: 688: 684: 677: 676: 668: 665: 653: 649: 642: 639: 627: 623: 616: 613: 597: 593: 586: 585: 577: 574: 558: 554: 547: 546: 538: 535: 524: 520: 516: 510: 507: 500: 493: 490: 489: 487: 482: 478: 476: 473: 471: 468: 466: 463: 461: 458: 456: 453: 451: 448: 446: 443: 441: 438: 435: 432: 429: 425: 422: 421: 417: 412: 409: 406: 403: 400: 399: 398: 396: 392: 385: 383: 381: 377: 373: 353: 349: 328: 325: 322: 317: 312: 307: 303: 299: 295: 294: 289: 285: 281: 277: 269: 267: 265: 260: 258: 253: 251: 248:, nor do the 247: 243: 231: 227: 223: 217: 208: 204: 200: 196: 192: 188: 183: 181: 177: 173: 169: 165: 153: 149: 148:end of a file 145: 141: 137: 133: 129: 125: 121: 115: 107: 102: 100: 98: 94: 90: 78: 73: 67: 63: 56: 51: 49: 44: 40: 33: 26: 22: 885: 874:. Retrieved 866: 857: 842: 831:. Retrieved 816: 805:. Retrieved 790: 761: 755:. Retrieved 732: 725: 700: 694:. Retrieved 674: 667: 656:. Retrieved 641: 630:. Retrieved 615: 603:. Retrieved 583: 576: 564:. Retrieved 544: 537: 526:. Retrieved 518: 509: 485: 389: 380:text editing 329: 326: 296:mode, or be 291: 287: 273: 261: 257:Visual Basic 254: 218: 207:command line 184: 117: 85: 64:). Standard 52: 38: 36: 610:(207 pages) 378:to control 318:" command ( 199:PC DOS 114:End-of-file 108:End of file 876:2012-06-02 867:IT Connect 833:2021-11-18 807:2021-11-18 757:2020-02-28 740:. p.  720:(56 pages) 696:2020-02-28 658:2021-11-18 632:2021-11-18 605:2014-07-10 566:2014-07-10 528:2012-06-02 501:References 492:Noto fonts 440:Access key 376:Xerox PARC 316:background 314:) or the " 298:terminated 293:background 288:foreground 270:Other uses 180:text files 152:filesystem 771:CONTROL-z 715:COM files 707:control-Z 523:Microsoft 465:Control-\ 460:Control-X 455:Control-V 450:Control-G 445:Control-C 340:⌘ Command 122:monitor, 66:keyboards 41:(␚) is a 914:Category 850:Archived 827:Archived 801:Archived 687:Archived 652:Archived 626:Archived 596:Archived 557:Archived 418:See also 372:keyboard 230:CSV-1203 176:DOS Plus 138:1 and 2 481:.notdef 428:ISO 646 395:Unicode 364:Control 356:Control 332:Control 306:SIGTSTP 284:suspend 246:Windows 234:Control 132:TOPS-10 93:Unicode 53:In the 748:  434:U+FFFD 280:shells 203:DR-DOS 195:MS-DOS 191:86-DOS 174:, and 130:, and 82:Ctrl+Z 767:ASCII 703:ASCII 690:(PDF) 679:(PDF) 599:(PDF) 588:(PDF) 560:(PDF) 549:(PDF) 391:ASCII 348:macOS 124:RT-11 120:PDP-6 763:CP/M 746:ISBN 711:CP/M 486:tofu 393:and 352:undo 276:Unix 250:APIs 212:COPY 187:CP/M 144:MP/M 136:CP/M 103:Uses 74:and 71:Ctrl 32:Undo 346:on 324:). 274:In 244:or 242:DOS 226:GIF 224:or 222:PNG 216:). 185:In 164:hex 128:VMS 62:hex 916:: 869:. 865:. 825:. 799:. 760:. 744:. 742:74 699:. 650:. 624:. 521:. 517:. 382:. 321:bg 311:fg 201:, 197:, 193:, 189:, 170:, 160:16 157:1A 126:, 91:. 87:^Z 59:1A 50:. 879:. 836:. 810:. 661:. 635:. 608:. 569:. 531:. 430:) 426:( 368:Z 366:+ 360:Z 358:+ 344:Z 342:+ 338:( 336:Z 334:+ 238:Z 236:+ 162:( 89:) 77:Z 34:. 27:. 25:⸮ 21:؟

Index

؟

Undo
control character
programming languages
ASCII character set
hex
keyboards
Ctrl
Z
Unicode
replacement character
End-of-file
PDP-6
RT-11
VMS
TOPS-10
CP/M
operating systems
MP/M
end of a file
filesystem
hex
Concurrent CP/M
Concurrent DOS
DOS Plus
text files
CP/M
86-DOS
MS-DOS

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.