joniles / rtfparserkit

Primary repository for RTF Parser Kit library
Apache License 2.0
104 stars 42 forks source link

utf-8 code page support #13

Closed albreax closed 8 years ago

albreax commented 8 years ago

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?

joniles commented 8 years ago

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

albreax commented 8 years ago

Hi, thanks a lot!