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

Fix charset conversion for invalid charsets #347

Merged
merged 1 commit into from
Apr 10, 2015

Conversation

aivot-on
Copy link
Contributor

For example string 'Elizabeth' passed through icu-charset-detector returns charset ibm424_rtl and Iconv cannot convert from ibm424_rtl to utf8. Enclosing the charset conversion inside try catch and returning the original buffer if it throws any errors so that it doesn't crash.

If icu detects an charset that cannot be converted with iconv, return
original buffer
assert.end();
});

test('irc.Client.convertEncoding', function(assert) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you ever setting Client.opt.encoding to true so that your new code is being executed?

@jirwin
Copy link
Collaborator

jirwin commented Apr 10, 2015

+1

jirwin added a commit that referenced this pull request Apr 10, 2015
Fix charset conversion for invalid charsets
@jirwin jirwin merged commit a29e052 into martynsmith:master Apr 10, 2015
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.

None yet

2 participants