做一个网站的完整教程,河南app定制,网站美食建设图片,大连网络工程如何以编程方式正确设置JVM(1.5.x)使用的默认字符编码#xff1f;我已经读过-Dfile.encoding 以前是以往的方式去为旧的JVM …我没有那么奢侈的原因#xff0c;我不会进入。我努力了#xff1a;System.setProperty(file.encoding, UTF-8);并且属…如何以编程方式正确设置JVM(1.5.x)使用的默认字符编码我已经读过-Dfile.encoding 以前是以往的方式去为旧的JVM …我没有那么奢侈的原因我不会进入。我努力了System.setProperty(file.encoding, UTF-8);并且属性设置但它似乎不会导致最后的getBytes调用下面使用UTF8System.setProperty(file.encoding, UTF-8);byte inbytes[] new byte[1024];FileInputStream fis new FileInputStream(response.txt);fis.read(inbytes);FileOutputStream fos new FileOutputStream(response-2.txt);String in new String(inbytes, UTF8);fos.write(in.getBytes());