在讀取文件時指定字符編碼
File f = new File("E:\\eclipse\\workspace\\box\\Data\\2003-3-7-100.inc");
//InputStreamReader(InputStream in, Charset cs)
InputStreamReader read = new InputStreamReader (new FileInputStream(f),"UTF-8");
或使用FileReader
FileReader fn = new FileReader("test.txt")
沒有留言:
張貼留言