diff --git a/lib/readline.js b/lib/readline.js index e6b57927791..1dc755fa266 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -136,7 +136,7 @@ Interface.prototype.setPrompt = function(prompt, length) { } else { var lines = prompt.split(/[\r\n]/); var lastLine = lines[lines.length - 1]; - this._promptLength = Buffer.byteLength(lastLine); + this._promptLength = lastLine.length; } };