JDK (Java Development Kit) Tutorials
Dr. Herong Yang, Version 5.00

Character Set Encoding Maps - US-ASCII and ISO-8859-1/Latin 1

This section provides a tutorial example of analyzing and printing character set encoding maps for 2 encodings: US-ASCII and ISO-8859-1/Latin 1.

Here is the output of my sample program, EncodingAnalyzer.java, for US-ASCII encoding:

Code Point > Byte Sequence - Code Point > Byte Sequence

0000 > 00 - 007F > 7F
0080 > 3F - FFFF > 3F

The encoding map of US-ASCII is very simple:

  • The encoded byte sequence is one byte only, taking the lower value byte of the code point.
  • Valid code points only in the 0x0000 - 0x007F range.

Here is the output of my sample program, EncodingAnalyzer.java, for ISO-8859-1/Latin 1 encoding:

Code Point > Byte Sequence - Code Point > Byte Sequence

0000 > 00 - 00FF > FF
0100 > 3F - FFFF > 3F

The encoding map of ISO-8859-1/Latin 1 is also very simple:

  • The encoded byte sequence is one byte only, taking the lower value byte of the code point.
  • Valid code points only in the 0x0000 - 0x00FF range, full range of the lower value byte.

Last update: 2006.

Sections in This Chapter

Character Set Encoding Map Analyzer

Character Set Encoding Maps - US-ASCII and ISO-8859-1/Latin 1

Character Set Encoding Maps - CP1252/Windows-1252

Character Set Encoding Maps - Unicode UTF-8

Character Set Encoding Maps - Unicode UTF-16, UTF-16LE, UTF-16BE

Character Counter Program for Any Given Encoding

Character Set Encoding Comparison

Dr. Herong Yang, updated in 2008
Character Set Encoding Maps - US-ASCII and ISO-8859-1/Latin 1