Default to UTF8 on stream write
This commit is contained in:
parent
5281f29012
commit
2ad587cc35
@ -429,7 +429,7 @@ Stream.prototype._writeOut = function (data, encoding) {
|
|||||||
allocNewPool();
|
allocNewPool();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encoding == 'utf8' || encoding == 'utf-8') {
|
if (!encoding || encoding == 'utf8' || encoding == 'utf-8') {
|
||||||
// default to utf8
|
// default to utf8
|
||||||
bytesWritten = pool.write(data, 'utf8', pool.used);
|
bytesWritten = pool.write(data, 'utf8', pool.used);
|
||||||
charsWritten = Buffer._charsWritten;
|
charsWritten = Buffer._charsWritten;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user