Unicode literal usage rules - Connect_CDC - connect_cdc_mimix_share - 5.8

Connect CDC System Reference Guide

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (MIMIX Share)
Version
5.8
Language
English
Product name
Connect CDC
Title
Connect CDC System Reference Guide
Copyright
2024
First publish date
2003
ft:lastEdition
2024-02-12
ft:lastPublication
2024-02-12T15:11:59.486869

The following rules apply to Unicode literals.

  • Unicode literals are treated as a sub-type of a character literal when used in expressions.

  • Unicode literals require single quotes. This is also a requirement for any character literal.

  • For Unicode literals, each Unicode character must begin with a single back slash followed by the small letter "u" and exactly 4 valid hexadecimal digits. The 4 digits taken together can represent any Unicode character from \u0000 to \uFFFF.

  • A Unicode literal must only contain Unicode escaped characters.

  • A Unicode literal cannot contain any of the other allowed escaped characters.

  • A character literal cannot contain a mixture of Unicode and non-Unicode characters.

Note: Precisely uses the standard Java convention to represent a Unicode character. This is because when you construct an escape sequence of characters in a Java string ("\uxxxx" where xxxx is some hexadecimal number), and the expression is generated, the compiler automatically generates the appropriate Unicode characters in the string.