The properties file should use FEQ, see discussion in
Fixed in the trunk.
The change resolved also the following issues:
- issue 89720 ("Cannot display Chinese characters in properties file")
- issue 35159 ("Allow searching non-English properties files")
- issue 32392 ("Edit Text Rather than Escape Sequences")
PropertiesEncoding.java (1.1 - new)
PropertiesEncodingTest.java (1.1 - new)
There was a bug in it - see issue #101732. When porting this change remember to
also port the fix:
I want to verify this and the others mentioned - some questions that will help
in doing this:
for 32392, what is the user model ? in that issue one comment was that they
did not want to need to see the escapped ascii in even the text version of the props
file but its still there now in nb6.
for 35159, i asked in that issue a clarification about verifying it - can you
look at it ?
for 89720, please see my question in that issue also.
The model is that .properties files use a special encoding which translates \uxxxx sequences to the corresponding
characters (when reading) and vice versa (when writing). The automatic result of the use of the special encoding is that
whoever reads the file with the proper encoding (i.e. the one obtained via FileEncodingQuery.getEncoding(...)), he gets
real characters in place of \uxxxx sequences. Because the editor uses the proper encoding, real characters are read (and
displayed) in place of the \uxxxx sequences. Similarly, whenever a .properties file is written to the disk, using
encoding obtained via FileEncodingQuery.getEncoding(...), all non-ASCII characters are written as \uxxxx sequences (on
The Find feature is one such application of the encoding - while files are searched, they are read using the encoding
obtained from FileEncodingQuery.getEncoding(...) so the core searching routine reads the actual characters instead of
the \uxxxx sequences.
The editor of .properties files is just another application of the same mechanism - while file is being read from the
disk, the \uxxxx sequences are translated to actual characters so the editor only gets the result of the translation -
the actual characters - and displays them as such. Vice versa, when the editor is writing the modified file to the disk,
any non-ASCII characters are translated as \uxxxx sequences while writing and the editor does not need to know about it.