-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setEncoding() fails if encoding is not Node native #4
Comments
@NuSkooler I created a branch for this, try with https://github.com/iiegor/ptyw.js/tree/fix-set-encoding. |
@iiegor, thanks for the quick response. I tried the fix-set-encoding branch: This prevents the initial crash, but introduces a few new issues:
I was able to fix (1) above by changing some code in the ctor:
Of course, this doesn't solve (2) or (3) and |
BTW, this workaround functions: door.on('data', function dataIn(data) {
self.client.term.write(decode(data, 'cp437')); /* or whatever encoding */
}); |
setEncoding()
will throw if encoding is not native to Node. In earlier versions of Node.js, one could expand the supported encodings Node supported (e.g. with iconv-lite). This has changed in 4+.See https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility
The text was updated successfully, but these errors were encountered: