Testing decode() Methods

This section describes 4 different methods provided in Java to decode byte sequences back to characters with a given encoding.

There are 4 methods provided in Java SE 7 to decode characters:

The way to use those methods is similar to encode methods described in previous sections.

Exercise: Write a Java program to decode byte sequences back to Unicode character code points.

Last update: 2012.

Table of Contents

 About This Book

 Character Sets and Encodings

 ASCII Character Set and Encoding

 GB2312 Character Set and Encoding

 GB18030 Character Set and Encoding

 JIS X0208 Character Set and Encodings

 Unicode Character Set

 UTF-8 (Unicode Transformation Format - 8-Bit)

 UTF-16, UTF-16BE and UTF-16LE Encodings

 UTF-32, UTF-32BE and UTF-32LE Encodings

 Java Language and Unicode Characters

Character Encoding in Java

 What Is Character Encoding?

 List of Supported Character Encodings in Java

 EncodingSampler.java - Testing encode() Methods

 Examples of CP1252 and ISO-8859-1 Encodings

 Examples of US-ASCII, UTF-8, UTF-16 and UTF-32 Encodings

 Examples of GB18030 Encoding

Testing decode() Methods

 Character Set Encoding Maps

 Encoding Conversion Programs for Encoded Text Files

 Using Notepad as a Unicode Text Editor

 Using Microsoft Word as a Unicode Text Editor

 Using Microsoft Excel as a Unicode Text Editor

 Unicode Fonts

 Unicode Code Point Blocks - Code Charts

 Outdated Tutorials

 References

 PDF Printing Version