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 node.js handling of multi-byte UTF8 characters #6761

Merged
merged 2 commits into from
May 14, 2019

Conversation

JohnChen0
Copy link
Contributor

@JohnChen0 JohnChen0 commented Dec 17, 2018

Fixes issue #6280, where the node.js API doesn't properly handle
multi-byte UTF8 characters received from the driver.


This change is Reviewable

Fixes issue SeleniumHQ#6280, where the node.js API doesn't properly handle
multi-byte UTF8 characters received from the driver.
@JohnChen0
Copy link
Contributor Author

@jleyba This PR replaces PR #6281, with the suggested changes. Thanks.

@JohnChen0
Copy link
Contributor Author

Friendly ping. PTAL.

@@ -232,7 +232,7 @@ function sendRequest(options, onOk, onError, opt_data, opt_proxy, opt_retries) {
var resp = new httpLib.Response(
/** @type {number} */(response.statusCode),
/** @type {!Object<string>} */(response.headers),
body.join('').replace(/\0/g, ''));
Buffer.concat(body).toString().replace(/\0/g, ''));
Copy link
Contributor

Choose a reason for hiding this comment

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

toString('utf8')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jleyba jleyba merged commit 2870009 into SeleniumHQ:master May 14, 2019
@JohnChen0 JohnChen0 deleted the nodejs branch May 20, 2019 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants