jcryptool / core

JCrypTool Core Plug-ins
https://www.cryptool.org
Eclipse Public License 1.0
163 stars 43 forks source link

Dev: wrong enconding by default in properties files #221

Closed simlei closed 4 years ago

simlei commented 4 years ago

Invalid: seems like .properties files in Java are ISO-8859-1 by specification: https://bugs.eclipse.org/bugs/show_bug.cgi?id=68270

This leads to the conclusion to never paste any unicode characters into properties files without making sure that they get automatically converted to \uxxxx codes. Everything else will potentially fail.

Debugging special characters issues, I discovered that, despite setting the global encoding to UTF8 in the Eclipse preferences, the .properties files (where virtually all our strings reside in!) are assigned the default Windows ISO encoding:

image

This has to be fixed to avoid having to deal with broken-characters bugs over and over in the future. Turns out, the setting to control that encoding is buried here:

image

(and we thought for years we had dealt with workspace encoding for good by using the global encoding to "UTF-8")

This issue should be closed by incorporating this setting into our Oomph configuration (see https://github.com/jcryptool/core/issues/209)

simlei commented 4 years ago

The programmatic preference coordinates are seen at the bottom of this screenshot:

image