File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3528,6 +3528,13 @@ On Linux, positional writes don't work when the file is opened in append mode.
3528
3528
The kernel ignores the position argument and always appends the data to
3529
3529
the end of the file.
3530
3530
3531
+ On Windows, if the file descriptor is connected to the console (e.g. ` fd == 1 `
3532
+ or ` stdout ` ) a string containing non-ASCII characters will not be rendered
3533
+ properly by default, regardless of the encoding used.
3534
+ It is possible to configure the console to render UTF-8 properly by changing the
3535
+ active codepage with the ` chcp 65001 ` command. See the [ chcp] [ ] docs for more
3536
+ details.
3537
+
3531
3538
## fs.writeFile(file, data[ , options] , callback)
3532
3539
<!-- YAML
3533
3540
added: v0.1.29
@@ -4926,3 +4933,4 @@ the file contents.
4926
4933
[ MSDN-Using-Streams ] : https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams
4927
4934
[ support of file system `flags` ] : #fs_file_system_flags
4928
4935
[ File Access Constants ] : #fs_file_access_constants
4936
+ [ chcp ] : https://ss64.com/nt/chcp.html
You can’t perform that action at this time.
0 commit comments