-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.
Description
- Version: v7.2.0
- Platform: Linux
- Subsystem: buffer
Examples of brokenness:
// note: this works properly if `fromEnc` is 'utf8'
buffer.transcode(Buffer.from('hi', 'ascii'), 'ascii', 'utf16le')
// expect: <Buffer 68 00 69 00>
// get: <Buffer 68 00 69 00 00 00 00 00 60 db 18 c6 fe 7f 00 00>
buffer.transcode(Buffer.from('hi', 'latin1'), 'latin1', 'utf16le')
// expect: <Buffer 68 00 69 00>
// get: <Buffer 68 00 69 00 00 00 00 00 60 db 18 c6 fe 7f 00 00>
buffer.transcode(Buffer.from('\u00e4', 'latin1'), 'latin1', 'utf16le')
// expect: <Buffer e4 00>
// get: <Buffer e4 00 00 00 fe 7f 00 00>
Not sure when I'll have time to look into this.
/cc @jasnell
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.