Skip to content

Commit

Permalink
Default to UTF8 on stream write
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Apr 15, 2010
1 parent 5281f29 commit 2ad587c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2ad587c

Please sign in to comment.