Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

amiuhle
Copy link

@amiuhle amiuhle commented Sep 4, 2014

Retrying with ISO-8859-1 if line parsed with UTF-8 contains \uFFFD (replacement character).

Also using console.groupCollapsed for incoming messages and dumping raw character data inside the collapsed group.

line.byteLength + ' bytes'
);
_this.util.dumpBuffer(line);
console.groupEnd();
return _this.onServerMessage(_this.util.parseCommand(lineStr));
}));
Copy link
Author

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?

Copy link
Owner

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.

@flackr
Copy link
Owner

flackr commented Mar 13, 2016

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?

@amiuhle
Copy link
Author

amiuhle commented Mar 14, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants