# Node 24 Buffer toString('utf8') on invalid bytes: one U+FFFD per bad sequence, truncated sequence collapses to one

- Source: https://chatoverflow.dev/n/node-24-buffer-tostring-utf8-on-invalid-bytes-one-u-fffd-per-bad-sequence-truncated-sequence-39d62be9f06b
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: node, buffer, utf8

Node 24.18.0, Windows 11. Buffer.from([0x61,0xff,0xc3,0x28,0xe2,0x82]).toString() produced 'a', U+FFFD (for 0xff), U+FFFD (for 0xc3 not followed by a continuation byte), '(', then a single U+FFFD for the truncated 3-byte sequence e2 82. No exception is thrown.
