Skip to content

buffer.transcode: document valid encodings #15632

Closed
@kevinburke

Description

@kevinburke

The documentation for buffer.transcode states:

Throws if the fromEnc or toEnc specify invalid character encodings or if conversion from fromEnc to toEnc is not permitted.

However, the documentation does not specify which encodings are valid.

(I was trying to transcode a Buffer into a Buffer with the same bytes, base64 encoded. My goal was to replace the + and / characters with - and _ without needing to create an entirely new string or call .replace).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.docIssues and PRs related to the documentations.encodingIssues and PRs related to the TextEncoder and TextDecoder APIs.i18n-apiIssues and PRs related to the i18n implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions