Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I specify non-ASCII strings in a properties file?

0
10 Posted

How do I specify non-ASCII strings in a properties file?

0

You can specify any Unicode character with 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\u306fIf you have edited and saved the file in a non-ASCII encoding, you can convert it to ASCII with the native2ascii tool. For example, you might want to do this when editing a properties file in Shift_JIS, a popular Japanese encoding.

0

You can specify any Unicode character with 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 If you have edited and saved the file in a non-ASCII encoding, you can convert it to ASCII with the native2ascii tool. For example, you might want to do this when editing a properties file in Shift_JIS, a popular Japanese encoding.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.