Re: [Rd] Buffering in R 3.5 connections causes incorrect data in readChar

2018-05-30 Thread Tomas Kalibera
For now I have added a warning that is issued (only) when there is definitely a problem (currently a read buffer, a pushback buffer or encoding conversion of the input). And I have added a similar warning for writing when there is encoding conversion of the output (writeChar). But, as you say,

Re: [Rd] Buffering in R 3.5 connections causes incorrect data in readChar

2018-05-29 Thread Aaron Goodman
Tomas, Thank you for the explanation. I see in the documentation: "These functions are intended to be used with binary-mode connections." So I see how using it on a text connection is undefined, and not a bug. An error or warning when attempting to use a it on a text connection would be helpful c

Re: [Rd] Buffering in R 3.5 connections causes incorrect data in readChar

2018-05-29 Thread Tomas Kalibera
On 05/26/2018 05:15 AM, Aaron Goodman wrote: I noticed an issue where readChar does not return the correct value after a call to readline. It appears that readChar is not aware of the buffering, so it reads from the end of the buffer, rather than the current position in the file. This is a signif

[Rd] Buffering in R 3.5 connections causes incorrect data in readChar

2018-05-28 Thread Aaron Goodman
I noticed an issue where readChar does not return the correct value after a call to readline. It appears that readChar is not aware of the buffering, so it reads from the end of the buffer, rather than the current position in the file. This is a significant change of behavior from R-3.4.4. Below i