search for: xfcrich

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

2014 Oct 19
1
Writing UTF8 on Windows
...ms to be latin1: > con <- file("test1.txt", open="wb", encoding = "UTF-8") > writeLines(string, con) > close(con) > system("file test1.txt") test1.txt: ISO-8859 text > readLines("test1.txt", encoding="UTF-8") [1] "Z\xfcrich" I am not quite sure if this is a bug or expected. To avoid this and other problems, jsonlite uses the 'useBytes` argument, which is supposed to suppress re-encoding when writing to the connection. This is exactly what we need: use enc2utf8 to convert our string to utf8 and then pass it b...