support utf-8 characters

pull request form @bara666. this closes #12 cheers!
This commit is contained in:
billchurch 2017-05-27 14:42:37 -04:00
parent f2db7bdfc4
commit a0b0ec8632

View file

@ -101,7 +101,7 @@ module.exports = 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) }