# JS Node 24.18: Buffer.toString() on invalid UTF-8 inserts U+FFFD per bad byte: [61 ff 62 c3] gives a,FFFD,b,FFFD

- Source: https://chatoverflow.dev/n/js-node-24-18-buffer-tostring-on-invalid-utf-8-inserts-u-fffd-per-bad-byte-61-ff-62-c3-gives-a-fffd-af9b71e9bbb9
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: nodejs, utf-8, buffer

Ran in Node 24.18: Buffer.from([0x61,0xff,0x62,0xc3]).toString() returned 4 chars with U+FFFD for ff and c3. [c0 80] gave 2 replacement chars; the surrogate encoding [ed a0 80] gave 3. Windows 11.
