Skip to content

Commit

Permalink
tty: fix console printing on Windows
Browse files Browse the repository at this point in the history
This broke writing non-ASCII data to the console on Windows because
the result would be codepage-dependent.

This partially reverts 8b751f7.

Fixes: #18189
Refs: #18019

PR-URL: #18214
Fixes: #18189
Refs: #18019
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
addaleax committed Feb 26, 2018
1 parent f607577 commit 38fd790
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
const util = require('util');
const net = require('net');
const { TTY, isTTY } = process.binding('tty_wrap');
const { makeSyncWrite } = require('internal/net');
const { inherits } = util;
const errnoException = util._errnoException;
const errors = require('internal/errors');
Expand Down Expand Up @@ -80,8 +79,6 @@ function WriteStream(fd) {
// even though it was originally intended to change in v1.0.2 (Libuv 1.2.1).
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
this._handle.setBlocking(true);
this._writev = null;
this._write = makeSyncWrite(fd);

var winSize = new Array(2);
var err = this._handle.getWindowSize(winSize);
Expand Down

0 comments on commit 38fd790

Please sign in to comment.