我想在控制台打印日文语言,这样我就可以通过maven命令在Jenkins中运行我的项目,但它总是打印???(请参考截图).我在目标中写了-Dproject.build.sourceEncoding=UTF-8和-Dproject.reporting.outputEncoding=UTF-8,但仍然没有打印。 我在goals中写了-Dproject.build.sourceEncoding=UTF-8和-Dproject.reporting.outputEncoding=UTF-8,但还是没有打印,我也试过用-Dfile.encoding=UTF-8,但没有用,我在surefire插件和pom.xml上的编译器插件中都加了编码,但还是没有用,谁能帮帮我,我到底哪里错了?[目标控制台输出]2
你可以打印 UTF-8
字样
String unicodeMessage = "\u7686\u3055\u3093\u3001\u3053\u3093\u306b\u3061\u306f";
PrintStream out = new PrintStream(System.out, true, "UTF-8");
out.println(unicodeMessage);
最新情况:
PrintStream out = new PrintStream(System.out, true, "UTF-8");
out.println("Notification List Header Text is: " + PLClinicalNotificationsHelper.getNotificationsListHeaderText());