看板 R_Language 關於我們 聯絡資訊
小弟我使用的是win10(我試過win7也是相同狀況) 在linux下則一切正常 我的csv檔是utf-8編碼的 我在R console下了 Sys.setlocale(category='LC_ALL', locale='C') 之後執行 readLines <-- 這個結果是正常的 read.csv <-- 中文無法正常顯示 read.table <-- 連讀都不能讀 實際的結果如下 http://imgur.com/a/DfPFp 請問要如何才能讓他正常顯示 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.116.67.55 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1468486946.A.1B1.html
ireullin: 不好意思,我自己試出來了,麻煩大家了 07/14 17:33
ireullin: Sys.setlocale(category = "LC_ALL", locale = "cht") 07/14 17:33
ireullin: read.table('chi_squared_test.csv', fileEncoding="UTF 07/14 17:34
obarisk: 裝bash 07/14 20:28