netbeans读取txt乱码。。。。很奇怪,我在netbeans中读取项目目录下的txt文件完全正常,但是读取其他目录
InputStreamReaderread=newInputStreamReader(newFileInputStream("班级.txt"),"UTF-8");//读取...
InputStreamReader read = new InputStreamReader(new FileInputStream("班级.txt"), "UTF-8");//读取文件
BufferedReader reader = new BufferedReader(read);
【正常】
InputStreamReader read = new InputStreamReader(new FileInputStream("学校\\班级.txt"), "UTF-8");//读取文件
BufferedReader reader = new BufferedReader(read);
【不正常,乱码】
求解。。。。。 展开
BufferedReader reader = new BufferedReader(read);
【正常】
InputStreamReader read = new InputStreamReader(new FileInputStream("学校\\班级.txt"), "UTF-8");//读取文件
BufferedReader reader = new BufferedReader(read);
【不正常,乱码】
求解。。。。。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询