You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DecodeStream.readString strips a leading U+FEFF from UTF-8 and UTF-16 strings #69
Decoding a String field in 'utf8', 'utf16le', 'ucs2', or 'utf16be' strips a leading U+FEFF code point, including when decoding bytes produced by toBuffer() or reading binary string fields such as OpenType name table records in fontkit.
DecodeStream.readString() in src/DecodeStream.js calls new TextDecoder(encoding) with default options (ignoreBOM: false), which removes a leading U+FEFF instead of preserving it as new TextDecoder(encoding, { ignoreBOM: true }) does.
Versions: restructure@3.0.2 and master (21346d5) on Node.js v26.13.0 (fontkit@3.0.0 also returns "Fam" instead of "\uFEFFFam" for a platform 3 UTF-16BE name record).
Activity