Hi Patrick,
thanks for your comments on the bug, just to clarify - one could
reproduce the bug simply using file() and readLines(). The parser saw a
real end of file as (incorrectly) communicated to it by lower level
connections code - there is no design issue related in the parser (nor
Hi Vladimir,
thanks for your report - this was really a bug, now fixed in R-devel and
to appear in 3.5.0.
Apart from the bug, having source files in UTF-8 and reading them into R
on Windows is perfectly fine, you just need to specify that they are in
UTF-8. You also need to make sure R is
My understanding (which could be wrong) is that when you source a file,
it first gets translated to your native locale and then parsed. When you
parse a character vector, it does not get translated.
In your locale, every "я" character (U+044F) gets replaced by the byte
"\xFF":
>