GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — utf16le encoding is missed in the File System API doc for streams · Issue #2787 · nodejs/node

utf16le encoding is missed in the File System API doc for streams #2787

New issue
Copy link
New issue
Copy link
Closed
Closed
utf16le encoding is missed in the File System API doc for streams#2787
Copy link
Labels
docIssues and PRs related to Node.js documentation.fsIssues and PRs related to file-system APIs and the fs module.i18n-apiIssues and PRs related to Node.js internationalization support.

Description

@vsemozhetbyt
vsemozhetbyt
opened on Sep 10, 2015
Issue body actions

There is an encoding list in the Buffer API doc: ascii, utf8, utf16le / ucs2, base64, binary, hex.

However the lists in the File System API doc for streams are not complete.

fs.createReadStream:

"The encoding can be 'utf8', 'ascii', or 'base64'."

fs.createWriteStream:

"The defaultEncoding can be 'utf8', 'ascii', binary, or 'base64'."

In the both lists the "utf16le / ucs2" encoding is misguidingly missed.

Activity

  1. mscdex
    added
    docIssues and PRs related to Node.js documentation.
    fsIssues and PRs related to file-system APIs and the fs module.
    on Sep 10, 2015
  2. claudiorodriguez commented on Sep 10, 2015

    @claudiorodriguez
    claudiorodriguez
    on Sep 10, 2015
    Contributor
    More actions

    As far as I can see at https://github.com/nodejs/node/blob/278a9267ec41f37e6b7dda876c417945d7725973/lib/_stream_readable.js and https://github.com/nodejs/node/blob/278a9267ec41f37e6b7dda876c417945d7725973/lib/_stream_writable.js - both fs.createReadStream and fs.createWriteStream internally use Buffer, so they should accept all of Buffer's encodings, unless I'm missing something. Maybe we could mention this and put a link to Buffer's doc in both cases?

  3. vsemozhetbyt commented on Sep 10, 2015

    @vsemozhetbyt
    vsemozhetbyt
    on Sep 10, 2015
    ContributorAuthor
    More actions

    At least my tests prove that the utf16le encoding works with fs.createReadStream and fs.createWriteStream.

  4. srl295
    added
    i18n-apiIssues and PRs related to Node.js internationalization support.
    on Oct 27, 2015
  5. jasnell commented on Apr 2, 2016

    @jasnell
    jasnell
    on Apr 2, 2016
    Member
    More actions

    Fixed in master.

  6. jasnell
    closed this as completedon Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.fsIssues and PRs related to file-system APIs and the fs module.i18n-apiIssues and PRs related to Node.js internationalization support.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.