作者shoeshoeshoe ()
看板java
標題[問題] 讀檔後 編碼的偵測
時間Wed Jun 9 19:54:10 2010
由於現在資料有多種編碼,
有哪個方法可以在讀檔檔後,偵測檔案的編碼格式(utf8 or big5)?
現在讀檔是用bufferedreader的方式。
謝謝回答喔!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.138.148.210
※ 編輯: shoeshoeshoe 來自: 140.138.148.210 (06/09 19:55)
→ shoeshoeshoe:請問如果要偵測的是抓下來的網頁檔案 而不是網址 06/10 10:03
→ shoeshoeshoe:這樣該怎辦 06/10 10:05
→ jlovet:網頁不是都會寫他是什麼encoding嘛, header也會寫 06/10 11:54
推 PsMonkey:同樓上,不過,還是有耍白爛的網頁會給錯 [茶] 06/10 12:34