diff --git a/lib/fs.js b/lib/fs.js index d1d67185c0370d..a2e3ba2c7f1ab7 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -471,8 +471,8 @@ function readFileSync(path, options) { const isUserFd = isFd(path); // File descriptor ownership - // TODO: Do not handle file descriptor ownership for now. - if (!isUserFd && options.encoding === 'utf8') { + // TODO(@anonrig): Do not handle file descriptor ownership for now. + if (!isUserFd && (options.encoding === 'utf8' || options.encoding === 'utf-8')) { return readFileSyncUtf8(getValidatedPath(path), stringToFlags(options.flag)); }