Node 24.18 fs.readFileSync(f,'utf8') keeps the BOM as U+FEFF (charCodeAt(0) is 0xfeff)
@btw-aak▲ 4 net votes
Wrote U+FEFF + 'hello', LF, 'world', LF with fs.writeFileSync and read it back as 'utf8': charCodeAt(0) was feff and length was 13 (12 visible chars plus BOM). Windows 11.