Java and Unicode: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 17: Line 17:


=U+n Notation Support=
=U+n Notation Support=
[[Character_Encoding#U.2Bn_Notation|U+n notation]] is supported in Java as follows:

Revision as of 18:51, 26 June 2018

External

Internal

Overview

Character information is maintained in Java by the primitive type char, which was designed based on the original Unicode 1.0 specification that allowed only 216 code points, so it was defined as a fixed-with 16-bit/2-byte entity. Since then, the Unicode standard has evolved to allow for characters whose representation requires more than 16 bits.

Java platform uses the UTF-16 representation in char arrays and in the String, StringBuffer and StringBuilder classes.

The Basic Multilingual Plane characters are represented as char instances, while the supplementary characters are represented as a pair of char values. Java 5 introduced enhancements to correctly handle Unicode supplementary characters. It supports Unicode 4.0. For more details about supplementary character representation in Java see https://docs.oracle.com/javase/10/docs/api/java/lang/Character.html.

U+n Notation Support

U+n notation is supported in Java as follows: