bbottema / rtf-to-html

RTF to HTML conversion done right
8 stars 5 forks source link

Conversion issues #2

Open mmarmol opened 3 years ago

mmarmol commented 3 years ago

I have this content, and a couple things are not working properly. The BM_BEGIN should not be present on the result. Also this are the text from \generator and \formatConverter should not be present on the end result:

Here is the original text:

{\rtf1\ansi\fbidis\ansicpg932\deff0\deftab720\fromtext{\fonttbl{\f0\fswiss\fcharset128 Times New Roman;}{\f1\fswiss\fcharset2
Symbol;}}
{\colortbl;\red192\green192\blue192;}
{\*\generator Microsoft Exchange Server;}
{\*\formatConverter converted from text;}
\viewkind5\viewscale100
{\*\bkmkstart BM_BEGIN}\pard\plain\f0{\fs22 Hello\line
\'82\'B1\'82\'F1\'82\'C9\'82\'BF\'82\'CD\line
}}

Here is the current result with RTF2HTMLConverterClassic:

<html><body style="font-family:'Courier',monospace;font-size:10pt;">   Microsoft Exchange Server;  converted from text;   BM_BEGIN
 Hello こんにちは  </body></html>

And with RTF2HTMLConverterRFCCompliant there is no HTML tags?: Microsoft Exchange Server;converted from text;BM_BEGINHelloこんにちは

mmarmol commented 3 years ago

I have also noticed that you are not doing anything with "\line". Looks like they should be a end of line, maybe a

in html.

mmarmol commented 3 years ago

Also RTF2HTMLConverterJEditorPane seems to fail when converting japanese.