Skip to content

fs: writing utf8 to fd 1 results in garbled output on windows #24550

Description

@mcollina
  • Version: 10.13 (also 8.x and before)
  • Platform: Windows
  • Subsystem: fs

The following snipped works fine on Linux and Mac OS X, but not on Windows:

const fs = require('fs')
const str = 'èè'
fs.write(1, str + '\n', 0, '', console.log)

Note that using process.stdout.write is actually working as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to file-system APIs and the fs module.known limitationIssues that are identified as known limitations.libuvIssues and PRs related to the libuv dependency or the uv binding.ttyIssues and PRs related to the tty subsystem.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions