Support to UTF-8 characters

This commit is contained in:
Manuel Barallobre 2017-05-22 13:27:20 +02:00
parent 938e2fbfa4
commit 03be6bb6d0

View file

@ -170,7 +170,7 @@ io.on('connection', function (socket) {
socket.on('error', function (error) { debugWebSSH2('SOCKET ERROR: ' + JSON.stringify(error)) })
stream.on('data', function (d) { socket.emit('data', d.toString('binary')) })
stream.on('data', function (d) { socket.emit('data', d.toString('utf-8')) })
stream.on('close', function (code, signal) {
err = { message: ((code || signal) ? (((code) ? 'CODE: ' + code : '') + ((code && signal) ? ' ' : '') + ((signal) ? 'SIGNAL: ' + signal : '')) : undefined) }