Java and Unicode: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
=External=
* http://www.oracle.com/us/technologies/java/supplementary-142654.html
=Internal=
=Internal=


* [[Character Encoding#Java_and_Unicode|Character Encoding]]
* [[Character Encoding#Java_and_Unicode|Character Encoding]]
* [[Java_Language#char|Java char]]


=Overview=
=Overview=
Line 8: Line 13:


Java platform uses the [[#UTF-16|UTF-16]] representation in char arrays and in the String and StringBuffer classes. The [[#Basic_Multilingual_Plane_.28BMP.29|Basic Multilingual Plane characters]] are represented as <tt>char</tt> instances, while the supplementary characters are represented as a pair of <tt>char</tt> values. For more details about supplementary character representation in Java see https://docs.oracle.com/javase/10/docs/api/java/lang/Character.html.
Java platform uses the [[#UTF-16|UTF-16]] representation in char arrays and in the String and StringBuffer classes. The [[#Basic_Multilingual_Plane_.28BMP.29|Basic Multilingual Plane characters]] are represented as <tt>char</tt> instances, while the supplementary characters are represented as a pair of <tt>char</tt> values. For more details about supplementary character representation in Java see https://docs.oracle.com/javase/10/docs/api/java/lang/Character.html.
Also see: {{Internal|Java_Language#char|char}}
More resources:
* http://www.oracle.com/us/technologies/java/supplementary-142654.html

Revision as of 18:24, 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 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 and StringBuffer classes. The Basic Multilingual Plane characters are represented as char instances, while the supplementary characters are represented as a pair of char values. For more details about supplementary character representation in Java see https://docs.oracle.com/javase/10/docs/api/java/lang/Character.html.