This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ained on any system using ASCII as its character code, independent of the byte ordering and word size conventions. As a consequence, text data is more platform-independent than binary data.
Aside: Generating an ASCII table. You can display a table showing the ASCII character code by executing the command man ascii. End Aside. Practice Problem 2.4:
What would be printed as a result of the following call to show_bytes: char *s = "ABCDEF"; show_bytes(s, strlen(s)); Note that letters ‘A’ through ‘Z’ have ASCII codes 0x41 through 0x5A. Aside: The Unicode character set. The ASCII character set is suitable for encoding English language documents, but it does not have much in the way of special characters, such as the French ‘c.’ It is wholly unsuited for encoding documents in languages such as ¸ Greek, Russian, and Chinese. Recently, the 16-bit Unicode character set has been adopted to support documents in all languages. This doubling of the character set representation enables a very large number of different characters to be represented. The Java programming language uses Unicode when representing characte...
View Full Document