We were using file.createReadStream() on gcloud node api to read a UTF-8 file contents.
In the beginning of the file some special characters broke on the process of concat the contents on "data" event.
We already made a workaround, but we think the createReadStrem needs more options like buffer size, or a function do get a file full content.
To ilustrate how the problem goes:
file.createReadStream()
.on('data', function(data) {
// Here may be the problem, like if we have in the first 200 characters of the file a sequence of "ç" they some will broke when reading the content.
content += data;
}).on('end', function() {
// use the file contents on content var
});
Thanks!
We were using file.createReadStream() on gcloud node api to read a UTF-8 file contents.
In the beginning of the file some special characters broke on the process of concat the contents on "data" event.
We already made a workaround, but we think the createReadStrem needs more options like buffer size, or a function do get a file full content.
To ilustrate how the problem goes:
Thanks!