Exporting runnable JAR file does not support UTF-8 encoding - Java Eclipse

后端 未结 1 1010
北恋
北恋 2021-01-25 04:15

I made this small Java program using eclipse IDE. I have set the workspace to support UTF-8 and the program runs happily when executed from eclipse.

Part of the program

相关标签:
1条回答
  • 2021-01-25 04:37

    You don't mention the classes you use to write to file, but have you tried setting the encoding explicitly?

    For example:

    Writer out = new OutputStreamWriter(fos, "UTF8");
    
    0 讨论(0)
提交回复
热议问题