Find out the currently set encoding for the workspace

Do we have any property or method to find out, what encoding I should use to e.g. write to a new file? In Eclipse I can configure the encoding for my workspace or project, which is the encoding I’m looking for.

bnd always writes UTF-8 … we even write the bnd files UTF-8 although the java properties use another encoding officially.

We use IO class and it always defaults to UTF-8 since the platform default was not a good idea.

It is for our code generator and I default to UTF8 now as well. Anything other then UTF8 usually causes problems anyway.

You’ve become a wise man!

Java’s idea to use the platform’s default was one of the awesome mistakes in computing science.