Is there a standard method to package a Unicode character so it fits an 8-Bit ASCII stream?
There are three or four options for making Unicode fit into an 8-bit format. a) Use UTF-8. This preserves ASCII, but not Latin-1, because the characters >127 are different from Latin-1. UTF-8 uses the bytes in the ASCII only for ASCII characters. Therefore, it works well in any environment where ASCII characters have a significance as syntax characters, e.g. file name syntaxes, markup languages, etc., but where the all other characters may use arbitrary bytes. Example: “Latin Small Letter s with Acute” (015B) would be encoded as two bytes: C5 9B. b) Use Java or C style escapes, of the form \uXXXXX or \xXXXXX. This format is not standard for text files, but well defined in the framework of the languages in question, primarily for source files. Example: The Polish word “wyjście” with character “Latin Small Letter s with Acute” (015B) in the middle (ś is one character) would look like: “wyj\u015Bcie”. c) Use the &#xXXXX; or &#DDDDD; numeric character escapes as in HTML or XML. Again, thes
Related Questions
- Install standard national fonts (not Unicode fonts) for all character sets you use. See section How does XEmacs display Unicode??.
- Is there a standard method to package a Unicode character so it fits an 8-Bit ASCII stream?
- Where is the difference between ASCII, OEM and ISO, ANSI character set vs. Unicode?