search for: usebyes

Displaying 1 result from an estimated 1 matches for "usebyes".

Did you mean: usebytes
2014 Oct 19
1
Writing UTF8 on Windows
...t;test2.txt", open="wb", encoding = "UTF-8") > writeLines(string, con, useBytes = TRUE) > close(con) > system("file test2.txt") test2.txt: UTF-8 Unicode text > readLines("test2.txt", encoding="UTF-8") [1] "Z?rich" However useByes results in incorrect output for non-binary connections. Not sure what is the intention here but it looks as if the string gets re-encoded one time too often: > con <- file("test3.txt", open="w", encoding = "UTF-8") > writeLines(string, con, useBytes = TRUE) &...