Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion rtf-interpreter.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ class RTFInterpreter extends Writable {
var charBuf = Buffer.alloc ? Buffer.alloc(2) : new Buffer(2)
// RTF, for reasons, represents unicode characters as signed integers
// thus managing to match literally no one.
charBuf.writeInt16LE(num, 0)
// Scratch that ^
charBuf.writeUInt16LE(num, 0)
this.group.addContent(new RTFSpan({value: iconv.decode(charBuf, 'ucs2')}))
}
ctrl$super () {
Expand Down