each character required a single byte for extended ascii characters.
how many bytes did each character require for extended ascii characters?
a single byte
some multi-byte character encodings (character encodings that can handle more than 256 different characters) are also true extended ascii. that means all ascii characters are encoded with a single byte with the same value as ascii, and these values are not used anywhere else. they can be used in file formats where only ascii bytes are used for keywords and file format syntax, while bytes 0x80-0xff might be used for free text, including most programming languages, where language keywords, variable names, and function names must be in ascii, but string constants and comments can use non-ascii characters. this makes it much easier to introduce a multi-byte character set into existing systems that use extended ascii.
extended ascii
bullet::::- "fallback and auto-detection:" utf-8 provided backwards compatibility for 7-bit ascii, but much software and data uses 8-bit extended ascii encodings designed prior to the adoption of unicode to represent the character sets of european languages. part of the popularity of utf-8 is due to the fact that it provides a form of backward compatibility for these as well. a utf-8 processor which erroneously receives an extended ascii file as input can "fall back" or replace 8-bit bytes using the appropriate code-point in the unicode latin-1 supplement block, when the 8-bit byte appears outside a valid multi-byte sequence. the bytes in extended ascii encodings of “real world” text are typically not legal utf-8 multi-byte sequences. this is because the bytes which "introduce" multi-byte sequences in utf-8 are primarily accented letters (mostly vowels) in the common extended ascii encodings, and the utf-8 "continuation" bytes are punctuation and symbol characters. to appear as a valid utf-8 multi-byte sequence, a series of 2 to 4 extended ascii 8-bit characters would have to be an unusual combination of symbols and accented letters (such as an accented vowel followed immediately by certain punctuation). in short, real-world extended ascii character sequences which look like valid utf-8 multi-byte sequences are unlikely. fallback errors will be false negatives, and these will be rare. moreover, in many applications, such as text display, the consequence of incorrect fallback is usually slight. only legibility is affected, and only for a few characters. these two things make fallback feasible, if somewhat imperfect. indeed, as discussed further below, the html5 standard requires that erroneous bytes in supposed utf-8 data be replaced upon display on the assumption that they are windows-1252 characters. the presence of invalid 8-bit characters outside valid multi-byte sequences can also be used to "auto-detect" that an encoding is actually an extended ascii encoding rather than utf-8, and decode it accordingly. a utf-8 stream may simply contain errors, resulting in the auto-detection scheme producing false positives; but auto-detection is successful in the majority of cases, especially with longer texts, and is widely used.
utf-8