Fix node.js handling of multi-byte UTF8 characters
* Fix node.js handling of multi-byte UTF8 characters
Fixes issue where the node.js API doesn't properly handle
multi-byte UTF8 characters received from the driver.
* Specify encoding in toString
@@ -235,7 +235,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('utf8').replace(/\0/g, ''));
onOk(resp);
});
});
