I'd like to know how to let my code produce the same output (UTF-8 or UTF16) on different platforms (at least windows and linux).
I thought it was possible to set a codepage to use by the application but I can't find the information to set a codepage. And I don't know if setting a codepage would really produce the same output when using special characters like äöü or other non latin characters.
I'd like to have a solution that works without setting arguments for java.exe.
Edit:
I mean the output to a console. A comment about possible effects on other output media would be nice.