在java读取文件时,有时会出现乱码,解决方法

InputStreamReader read =  new InputStreamReader(new FileInputStream(file),"UTF-8");


BufferedReader reader = null;

reader = new BufferedReader(read);


String tempString = reader.readLine();

你可能感兴趣的:(在java读取文件时,有时会出现乱码,解决方法)