On line 305 of ya-csv.js, it writes to the writeStream using this.encoding, but since the function is not invoked on an object, this is the Node global (not the write stream). Therefore this.encoding will probably never be defined.
It should read encoding from writer to properly use custom encodings. This PR fixes that.
On line 305 of ya-csv.js, it writes to the writeStream using
this.encoding
, but since the function is not invoked on an object,this
is the Node global (not the write stream). Thereforethis.encoding
will probably never be defined.It should read
encoding
fromwriter
to properly use custom encodings. This PR fixes that.