1
A
回答
0
## x is intended to be in latin1
x <- "fa\xE7ile"
Encoding(x)
Encoding(x) <- "latin1"
x
xx <- iconv(x, "latin1", "UTF-8")
Encoding(c(x, xx))
c(x, xx)
Encoding(xx) <- "bytes"
xx # will be encoded in hex
cat("xx = ", xx, "\n", sep = "")
http://www.inside-r.org/r-doc/base/Encoding
https://stat.ethz.ch/R-manual/R-devel/library/base/html/Encoding.html
相關問題
- 1. R腳本文件編碼(R Studio)
- 2. 如何在R中對腳本進行腳本編程
- 3. 在php腳本中的R腳本
- 4. 在PHP數據庫備份腳本中編碼和轉義
- 5. 從C代碼中調用R腳本
- 6. 如何使用腳本定義(sdef)編譯AppleScript腳本庫(scptd)
- 7. 定義在行動腳本
- 8. 編程中的R - 輸出R中控制檯比腳本
- 9. 頁腳中的自定義腳本
- 10. 在prolog腳本中定義列表
- 11. 在HTML中定義的加載腳本
- 12. iframe在Greasemonkey腳本中未定義
- 13. 在bash腳本中定義變量
- 14. chrome.runtime.onMessage.addListener在內容腳本中未定義
- 15. 在後臺腳本中,chrome.runtime未定義
- 16. 如何在CakePHP中定義腳本?
- 17. 編寫自定義內核svm在R
- 18. 編碼中的R
- 19. 編碼中的R
- 20. R - 從硬編碼腳本移動到函數
- 21. TFS版本定義中的Powershell腳本
- 22. 腳本編譯C代碼
- 23. 編碼URL UTF8 - 殼腳本
- 24. Shell腳本不編碼ASCII
- 25. 以編程方式執行R腳本
- 26. 將R代碼轉換爲Python腳本
- 27. [R腳本
- 28. 編寫腳本在Excel VBA代碼
- 29. 在PHP腳本的sql編碼
- 30. 需要在編譯/構建之前運行自定義腳本