tmporaries
tmporaries

Reputation: 1553

How to automatically encode Unicode Strings when externalizing in Intellij IDEA

I want to prepare resource bundle with localized strings. The problem is that java properties files don't support unicode. Therefore, I need to keep strings like \u0412\u044B... in my properties file. Is there a way to translate strings into such format automatically using Intellij IDEA?

enter image description here

I tried to use some embedded editor but it doesn't covert strings to \u0412\u044B... representation.

enter image description here

Upvotes: 2

Views: 2252

Answers (1)

Bohuslav Burghardt
Bohuslav Burghardt

Reputation: 34826

Go to Settings/Editor/File Encodings and check Transparent native-to-ascii conversion.

With that option enabled any Unicode characters in your properties files will get automatically converted to corresponding escape sequences.

Upvotes: 6

Related Questions