-
Notifications
You must be signed in to change notification settings - Fork 79
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
Fall back to ISO-8859-1 if UTF-8 fails #326
base: master
Are you sure you want to change the base?
Conversation
…ke Chrome parse test js as utf-8
line.byteLength + ' bytes' | ||
); | ||
_this.util.dumpBuffer(line); | ||
console.groupEnd(); | ||
return _this.onServerMessage(_this.util.parseCommand(lineStr)); | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSHint gives me W083
Don't make functions within a loop.
Want me to clean this up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's only necessary if this is actually being called after the loop finishes referring to variables updated or defined in the loop. If it's called immediately (in fromSocketData) it doesn't matter.
Sorry this fell under my radar way back when you made the pull request - I assume this is still an existing issue? Would you mind resolving conflicts and also rebase squashing to be a single commit on top of master? |
Hey, thanks for the feedback :) I'd have to check, this happened to me on one specific server which I haven't used in a while. I'll let you know when I've gotten around to do the rebase. |
Retrying with
ISO-8859-1
if line parsed withUTF-8
contains\uFFFD
(replacement character).Also using console.groupCollapsed for incoming messages and dumping raw character data inside the collapsed group.