mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Default to UTF8 on stream write
This commit is contained in:
1 parent
5281f29012
commit
2ad587cc35
1 file changed
+1
-1
+1
-1
@@ -429,7 +429,7 @@ Stream.prototype._writeOut = function (data, encoding) {
|
||||
allocNewPool();
|
||||
}
|
||||
|
||||
if (encoding == 'utf8' || encoding == 'utf-8') {
|
||||
if (!encoding || encoding == 'utf8' || encoding == 'utf-8') {
|
||||
// default to utf8
|
||||
bytesWritten = pool.write(data, 'utf8', pool.used);
|
||||
charsWritten = Buffer._charsWritten;
|
||||
|
||||
Reference in new issue
Block a user