Skip to content

fsPromises.readFile ignores encoding option #19286

Closed
@Legends

Description

@Legends
  • Version: v10.0.0-nightly20180309099e621648
  • Platform: Win10 x64
  • Subsystem: ?
var fs = require('fs/promises'); 
fs.readFile(path,"utf8").then((data)=>...

data will be of type string, when specifying the encoding in the method call, but with the latest version (v10.0.0-nightly20180309099e621648) I have to data.toString("utf8") again, to get the result as string.

By design?

Metadata

Metadata

Assignees

Labels

confirmed-bugIssues with confirmed bugs.fsIssues and PRs related to the fs subsystem / file system.promisesIssues and PRs related to ECMAScript promises.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions