Dear all,

I tried to run the following code on 3 different OS:

```
download.file("
https://raw.githubusercontent.com/wush978/DataScienceAndR/course/RBasic-07-Loading-Dataset/orglist-100.CSV";,
destfile = "orglist-100.CSV")
con <- file("orglist-100.CSV", encoding = "UTF-16LE")
src <- readLines(con)
length(src) # should be 100
```

On ubuntu and OS X, R correctly read 100 lines from the file. However, the
windows will only read the first line with the following warning message:

```
Warning message:
In readLines(file("orglist-100.CSV", encoding = "UTF-16LE")) :
  incomplete final line found on 'orglist-100.CSV'
```

Is there any recommended way to read a local UTF-16LE file on windows?

Thanks,
Wush

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to