List of Supported Character Encodings in Java

This section provides a list of supported character encodings supported in Java. The list is generated using the availableCharsets() static method in the java.nio.charset.Charset class.

Before looking at how to perform an character encoding, let's see how many encodings are supported in Java 11 using the availableCharsets() static method in the java.nio.charset.Charset class.

Here is my tutorial program to display all the supported character encodings in Java:

 * Copyright (c) 2019 All Rights Reserved.
import java.nio.charset.*;
import java.util.*;
class Encodings {
   public static void main(String[] arg) {
      SortedMap m = Charset.availableCharsets();
      Set k = m.keySet();
      System.out.println("Canonical name, Display name,"
         +" Can encode, Aliases");
      Iterator i = k.iterator();
      while (i.hasNext()) {
         String n = (String);
         Charset e = (Charset) m.get(n);
         String d = e.displayName();
         boolean c = e.canEncode();
         System.out.print(n+", "+d+", "+c);
         Set s = e.aliases();
         Iterator j = s.iterator();
         while (j.hasNext()) {
            String a = (String);         
            System.out.print(", "+a);

Compile and run it with Java 11:


C:\herong>java Encodings
Canonical name, Display name, Can encode, Aliases
Big5, Big5, true, csBig5
Big5-HKSCS, Big5-HKSCS, true, big5-hkscs, big5hk, Big5_HKSCS, big5hkscs
CESU-8, CESU-8, true, CESU8, csCESU-8
EUC-JP, EUC-JP, true, csEUCPkdFmtjapanese, x-euc-jp, eucjis, Extended_...
EUC-KR, EUC-KR, true, ksc5601-1987, csEUCKR, ksc5601_1987, ksc5601, ...
GB18030, GB18030, true, gb18030-2000
GB2312, GB2312, true, gb2312, euc-cn, x-EUC-CN, euccn, EUC_CN, gb2312-...
GBK, GBK, true, CP936, windows-936
IBM-Thai, IBM-Thai, true, ibm-838, ibm838, 838, cp838
IBM00858, IBM00858, true, cp858, 858, PC-Multilingual-850+euro, ...
IBM01140, IBM01140, true, cp1140, 1140, cp01140, ebcdic-us-037+euro, ...
IBM01141, IBM01141, true, 1141, cp1141, cp01141, ccsid01141, ebcdic-...
IBM01142, IBM01142, true, 1142, cp1142, cp01142, ccsid01142, ebcdic-...
IBM01143, IBM01143, true, 1143, cp01143, ccsid01143, cp1143, ebcdic-...
IBM01144, IBM01144, true, cp01144, ccsid01144, ebcdic-it-280+euro, ...
IBM01145, IBM01145, true, ccsid01145, ebcdic-es-284+euro, 1145, cp1145,...
IBM01146, IBM01146, true, ebcdic-gb-285+euro, 1146, cp1146, cp01146, ...
IBM01147, IBM01147, true, cp1147, 1147, cp01147, ccsid01147, ebcdic-fr-...
IBM01148, IBM01148, true, cp1148, ebcdic-international-500+euro, 1148, ...
IBM01149, IBM01149, true, ebcdic-s-871+euro, 1149, cp1149, cp01149, ...
IBM037, IBM037, true, cp037, ibm037, ibm-037, csIBM037, ebcdic-cp-us, ...
IBM1026, IBM1026, true, cp1026, ibm-1026, 1026, ibm1026
IBM1047, IBM1047, true, ibm-1047, 1047, cp1047
IBM273, IBM273, true, ibm-273, ibm273, 273, cp273
IBM277, IBM277, true, ibm277, 277, cp277, ibm-277
IBM278, IBM278, true, cp278, 278, ibm-278, ebcdic-cp-se, csIBM278, ...
IBM280, IBM280, true, ibm280, 280, cp280, ibm-280
IBM284, IBM284, true, csIBM284, ibm-284, cpibm284, ibm284, 284, ...
IBM285, IBM285, true, csIBM285, cp285, ebcdic-gb, ibm-285, cpibm285, ...
IBM290, IBM290, true, ibm290, 290, cp290, EBCDIC-JP-kana, csIBM290, ...
IBM297, IBM297, true, 297, csIBM297, cp297, ibm297, ibm-297, ...
IBM420, IBM420, true, ibm420, 420, cp420, csIBM420, ibm-420, ...
IBM424, IBM424, true, ebcdic-cp-he, csIBM424, ibm-424, ibm424, 424, ...
IBM437, IBM437, true, ibm437, 437, ibm-437, cspc8codepage437, cp437, ...
IBM500, IBM500, true, ibm-500, ibm500, 500, ebcdic-cp-bh, ...
IBM775, IBM775, true, ibm-775, ibm775, 775, cp775
IBM850, IBM850, true, cp850, cspc850multilingual, ibm850, 850, ibm-850
IBM852, IBM852, true, csPCp852, ibm-852, ibm852, 852, cp852
IBM855, IBM855, true, ibm855, 855, ibm-855, cp855, cspcp855
IBM857, IBM857, true, ibm857, 857, cp857, csIBM857, ibm-857
IBM860, IBM860, true, ibm860, 860, cp860, csIBM860, ibm-860
IBM861, IBM861, true, cp861, ibm861, 861, ibm-861, cp-is, csIBM861
IBM862, IBM862, true, csIBM862, cp862, ibm862, 862, cspc862latinhebrew,...
IBM863, IBM863, true, csIBM863, ibm-863, ibm863, 863, cp863
IBM864, IBM864, true, csIBM864, ibm-864, ibm864, 864, cp864
IBM865, IBM865, true, ibm-865, csIBM865, cp865, ibm865, 865
IBM866, IBM866, true, ibm866, 866, ibm-866, csIBM866, cp866
IBM868, IBM868, true, ibm868, 868, cp868, csIBM868, ibm-868, cp-ar
IBM869, IBM869, true, cp869, ibm869, 869, ibm-869, cp-gr, csIBM869
IBM870, IBM870, true, 870, cp870, csIBM870, ibm-870, ibm870, ebcdic-cp-...
IBM871, IBM871, true, ibm871, 871, cp871, ebcdic-cp-is, csIBM871, ibm-871
IBM918, IBM918, true, 918, ibm-918, ebcdic-cp-ar2, cp918
ISO-2022-CN, ISO-2022-CN, false, csISO2022CN, ISO2022CN
ISO-2022-JP, ISO-2022-JP, true, csjisencoding, iso2022jp, jis_encoding, ...
ISO-2022-JP-2, ISO-2022-JP-2, true, csISO2022JP2, iso2022jp2
ISO-2022-KR, ISO-2022-KR, true, csISO2022KR, ISO2022KR
ISO-8859-1, ISO-8859-1, true, 819, ISO8859-1, l1, ISO_8859-1:1987, ...
ISO-8859-13, ISO-8859-13, true, iso_8859-13, ISO8859-13, iso8859_13, ...
ISO-8859-15, ISO-8859-15, true, csISO885915, Latin-9, ISO8859-15, ...
ISO-8859-16, ISO-8859-16, true, ISO_8859-16:2001, latin10, iso-ir-226,...
ISO-8859-2, ISO-8859-2, true, ISO8859-2, ibm912, l2, ISO_8859-2, 8859_...
ISO-8859-3, ISO-8859-3, true, ISO8859-3, ibm913, 8859_3, l3, cp913, ...
ISO-8859-4, ISO-8859-4, true, 8859_4, latin4, l4, cp914, ISO_8859-4...
ISO-8859-5, ISO-8859-5, true, ISO_8859-5:1988, csISOLatinCyrillic, ...
ISO-8859-6, ISO-8859-6, true, ASMO-708, 8859_6, iso8859_6, ISO_8859-6,...
ISO-8859-7, ISO-8859-7, true, greek, 8859_7, greek8, ibm813, ISO_8859-...
ISO-8859-8, ISO-8859-8, true, 8859_8, ISO_8859-8, ISO_8859-8:1988, ...
ISO-8859-9, ISO-8859-9, true, ibm-920, ISO_8859-9, 8859_9, ISO_8859-:...
JIS_X0201, JIS_X0201, true, JIS0201, csHalfWidthKatakana, X0201, JIS_...
JIS_X0212-1990, JIS_X0212-1990, true, JIS0212, iso-ir-159, x0212, jis_...
KOI8-R, KOI8-R, true, koi8_r, koi8, cskoi8r
KOI8-U, KOI8-U, true, koi8_u
Shift_JIS, Shift_JIS, true, shift_jis, x-sjis, sjis, shift-jis, ...
TIS-620, TIS-620, true, tis620, tis620.2533
US-ASCII, US-ASCII, true, ANSI_X3.4-1968, cp367, csASCII, iso-ir-6, ...
UTF-16, UTF-16, true, UTF_16, unicode, utf16, UnicodeBig
UTF-16BE, UTF-16BE, true, X-UTF-16BE, UTF_16BE, ISO-10646-UCS-2, ...
UTF-16LE, UTF-16LE, true, UnicodeLittleUnmarked, UTF_16LE, X-UTF-16LE
UTF-32, UTF-32, true, UTF_32, UTF32
UTF-32BE, UTF-32BE, true, X-UTF-32BE, UTF_32BE
UTF-32LE, UTF-32LE, true, X-UTF-32LE, UTF_32LE
UTF-8, UTF-8, true, unicode-1-1-utf-8, UTF8
windows-1250, windows-1250, true, cp1250, cp5346
windows-1251, windows-1251, true, cp5347, ansi-1251, cp1251
windows-1252, windows-1252, true, ibm-1252, cp1252, ibm1252, cp5348
windows-1253, windows-1253, true, cp1253, cp5349
windows-1254, windows-1254, true, cp1254, cp5350
windows-1255, windows-1255, true, cp1255
windows-1256, windows-1256, true, cp1256
windows-1257, windows-1257, true, cp1257, cp5353
windows-1258, windows-1258, true, cp1258
windows-31j, windows-31j, true, MS932, windows-932, csWindows31J
x-Big5-HKSCS-2001, x-Big5-HKSCS-2001, true, Big5_HKSCS_2001, big5-...
x-Big5-Solaris, x-Big5-Solaris, true, Big5_Solaris
x-euc-jp-linux, x-euc-jp-linux, true, euc_jp_linux, euc-jp-linux
x-EUC-TW, x-EUC-TW, true, euctw, cns11643, EUC-TW, euc_tw
x-eucJP-Open, x-eucJP-Open, true, eucJP-open, EUC_JP_Solaris
x-IBM1006, x-IBM1006, true, ibm1006, ibm-1006, 1006, cp1006
x-IBM1025, x-IBM1025, true, ibm-1025, 1025, cp1025, ibm1025
x-IBM1046, x-IBM1046, true, ibm1046, ibm-1046, 1046, cp1046
x-IBM1097, x-IBM1097, true, ibm1097, ibm-1097, 1097, cp1097
x-IBM1098, x-IBM1098, true, ibm-1098, 1098, cp1098, ibm1098
x-IBM1112, x-IBM1112, true, ibm1112, ibm-1112, 1112, cp1112
x-IBM1122, x-IBM1122, true, cp1122, ibm1122, ibm-1122, 1122
x-IBM1123, x-IBM1123, true, ibm1123, ibm-1123, 1123, cp1123
x-IBM1124, x-IBM1124, true, ibm-1124, 1124, cp1124, ibm1124
x-IBM1166, x-IBM1166, true, cp1166, ibm1166, ibm-1166, 1166
x-IBM1364, x-IBM1364, true, cp1364, ibm1364, ibm-1364, 1364
x-IBM1381, x-IBM1381, true, cp1381, ibm-1381, 1381, ibm1381
x-IBM1383, x-IBM1383, true, ibm1383, ibm-1383, 1383, cp1383, cpeuccn, ...
x-IBM300, x-IBM300, true, cp300, ibm300, 300, ibm-300
x-IBM33722, x-IBM33722, true, 33722, ibm-33722, cp33722, ibm33722, ...
x-IBM737, x-IBM737, true, cp737, ibm737, 737, ibm-737
x-IBM833, x-IBM833, true, ibm833, cp833, ibm-833
x-IBM834, x-IBM834, true, ibm834, 834, cp834, ibm-834
x-IBM856, x-IBM856, true, ibm856, 856, cp856, ibm-856
x-IBM874, x-IBM874, true, ibm-874, ibm874, 874, cp874
x-IBM875, x-IBM875, true, ibm-875, ibm875, 875, cp875
x-IBM921, x-IBM921, true, ibm921, 921, ibm-921, cp921
x-IBM922, x-IBM922, true, ibm922, 922, cp922, ibm-922
x-IBM930, x-IBM930, true, ibm-930, ibm930, 930, cp930
x-IBM933, x-IBM933, true, ibm933, 933, cp933, ibm-933
x-IBM935, x-IBM935, true, cp935, ibm935, 935, ibm-935
x-IBM937, x-IBM937, true, ibm-937, ibm937, 937, cp937
x-IBM939, x-IBM939, true, ibm-939, cp939, ibm939, 939
x-IBM942, x-IBM942, true, ibm-942, cp942, ibm942, 942
x-IBM942C, x-IBM942C, true, ibm932, x-ibm932, ibm-932, ibm942C, ...
x-IBM943, x-IBM943, true, ibm943, 943, ibm-943, cp943
x-IBM943C, x-IBM943C, true, 943C, cp943C, ibm943C, ibm-943C
x-IBM948, x-IBM948, true, ibm-948, ibm948, 948, cp948
x-IBM949, x-IBM949, true, ibm-949, ibm949, 949, cp949
x-IBM949C, x-IBM949C, true, ibm949C, ibm-949C, cp949C, 949C
x-IBM950, x-IBM950, true, cp950, ibm950, 950, ibm-950
x-IBM964, x-IBM964, true, ibm-964, cp964, ibm964, 964
x-IBM970, x-IBM970, true, ibm970, ibm-eucKR, 970, cp970, ibm-970
x-ISCII91, x-ISCII91, true, ISCII91, iso-ir-153, iscii, ...
x-ISO-2022-CN-CNS, x-ISO-2022-CN-CNS, true, ISO2022CN_CNS, ...
x-ISO-2022-CN-GB, x-ISO-2022-CN-GB, true, ISO2022CN_GB, ...
x-iso-8859-11, x-iso-8859-11, true, iso-8859-11, iso8859_11
x-JIS0208, x-JIS0208, true, JIS0208, JIS_C6226-1983, iso-ir-87, ...
x-JISAutoDetect, x-JISAutoDetect, false, JISAutoDetect
x-Johab, x-Johab, true, ms1361, ksc5601_1992, johab, ksc5601-1992
x-MacArabic, x-MacArabic, true, MacArabic
x-MacCentralEurope, x-MacCentralEurope, true, MacCentralEurope
x-MacCroatian, x-MacCroatian, true, MacCroatian
x-MacCyrillic, x-MacCyrillic, true, MacCyrillic
x-MacDingbat, x-MacDingbat, true, MacDingbat
x-MacGreek, x-MacGreek, true, MacGreek
x-MacHebrew, x-MacHebrew, true, MacHebrew
x-MacIceland, x-MacIceland, true, MacIceland
x-MacRoman, x-MacRoman, true, MacRoman
x-MacRomania, x-MacRomania, true, MacRomania
x-MacSymbol, x-MacSymbol, true, MacSymbol
x-MacThai, x-MacThai, true, MacThai
x-MacTurkish, x-MacTurkish, true, MacTurkish
x-MacUkraine, x-MacUkraine, true, MacUkraine
x-MS932_0213, x-MS932_0213, true, MS932:2004, windows-932:2004, ...
x-MS950-HKSCS, x-MS950-HKSCS, true, MS950_HKSCS
x-MS950-HKSCS-XP, x-MS950-HKSCS-XP, true, MS950_HKSCS_XP
x-mswin-936, x-mswin-936, true, ms936, ms_936
x-PCK, x-PCK, true, pck
x-SJIS_0213, x-SJIS_0213, true, shift_jis:2004, sjis_0213, ...
x-UTF-16LE-BOM, x-UTF-16LE-BOM, true, UnicodeLittle
x-windows-50220, x-windows-50220, true, cp50220, ms50220
x-windows-50221, x-windows-50221, true, cp50221, ms50221
x-windows-874, x-windows-874, true, ms-874, ms874, windows-874
x-windows-949, x-windows-949, true, windows949, ms949, windows-949, ...
x-windows-950, x-windows-950, true, ms950, windows-950
x-windows-iso2022jp, x-windows-iso2022jp, true, windows-iso2022jp

The output is very impressive. Java supports a total of 172 character encodings!

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 - 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: 0000 - 0FFF

 Unicode Code Point Blocks: 1000 - FFFF

 Unicode Code Point Blocks: 10000 - 11FFF

 Unicode Code Point Blocks: 12000 - 10FFFF

 Archived Tutorials


 Full Version in PDF/EPUB