-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
Description
- Version: master
- Platform: all
- Subsystem: fs
Discovered during #18144
// Flags: --expose_externalize_string
'use strict';
const assert = require('assert');
const fs = require('fs');
const file = 'write-external.txt';
const expected = '中文';
externalizeString(expected);
fs.open(file, 'w', 0o644, function(err, fd) {
fs.write(fd, expected, 0, 'utf8', function(err, written) {
fs.closeSync(fd);
const found = fs.readFileSync(file, 'utf8');
fs.unlinkSync(file);
assert.strictEqual(expected, found); // AssertionError [ERR_ASSERTION]: '中文' strictEqual '-N�e'
});
});
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.