Skip to content

Instantly share code, notes, and snippets.

@ry
Created December 7, 2009 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ry/250922 to your computer and use it in GitHub Desktop.
Save ry/250922 to your computer and use it in GitHub Desktop.
diff --git a/src/node.js b/src/node.js
index c8f55c6..c0cd5db 100644
--- a/src/node.js
+++ b/src/node.js
@@ -536,6 +536,7 @@ var posixModule = createInternalModule("posix", function (exports) {
exports.read = function (fd, length, position, encoding) {
var promise = new process.Promise()
+ encoding = encoding | "binary";
process.fs.read(fd, length, position, encoding, callback(promise));
return promise;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment