This topic explains how you can specify Unicode (non-ASCII) characters in VMware Tanzu GemFire property files by using a \uXXXX escape sequence.

For a supplementary character, you need two escape sequences, one for each of the two UTF-16 code units. The XXXX denotes the 4 hexadecimal digits for the value of the UTF-16 code unit. For example, a properties file might have the following entries:

s1=hello there
s2=\u3053\u3093\u306b\u3061\u306f

For example, in gemfire.properties, you might the following to indicate the desired property definition of log-file=myß.log.

log-file=my\u00df.log

If you have edited and saved the file in a non-ASCII encoding, you can convert it to ASCII with the native2ascii tool included in your Oracle Java distribution. For example, you might want to do this when editing a properties file in Shift_JIS, a popular Japanese encoding.

For more information about internationalization in Java, see Java Internationalization in the Oracle Java documentation.

check-circle-line exclamation-circle-line close-line
Scroll to top icon