镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[buffer] fill() for utf16le is broken #9836

Closed

Description

@trevnorris
  • Version: v6.9.1
  • Platform: Linux
  • Subsystem: buffer

Example of brokenness:

Buffer.allocUnsafeSlow(16).fill('a', 'utf16le').toString('utf16le')
// expect: 'aaaaaaaa'
// get:    '慡慡慡慡慡慡慡慡'

Seems to be treating the character as latin1.

Activity

  1. added
    bufferIssues and PRs related to the buffer subsystem.
    on Nov 29, 2016
  2. trevnorris commented on Dec 13, 2016

    @trevnorris
    ContributorAuthor

    Thanks @addaleax!

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

    bufferIssues and PRs related to the buffer subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions