joniles / rtfparserkit

Primary repository for RTF Parser Kit library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

utf-8 code page support

albreax opened this issue · comments

I get an unsupported encoding command error with an utf-8 (65001) encoded RTF.
{\rtf1\ansi\ansicpg-535\deff0\….
https://en.wikipedia.org/wiki/Windows_code_page
(generated by copy to clipboard in MS Outlook)
The reason for the negativ value -535:
"RTF control words generally accept signed 16-bit numbers as arguments. For this reason, Unicode values greater than 32767 must be expressed as negative numbers."
(source: https://msdn.microsoft.com/de-de/library/aa140277%28office.10%29.aspx)

Can you support this encoding?

Hi, thanks for noting this. I have updated the library to support encoding presented in this format and made a new release.

Hi, thanks a lot!