Converting RTF to Text

S

satv73

Hi All,
I have an issue with converting RTF fragments(containing non-English
characters) to Text.

My issue is, I need to parse rtf stream comming in from an application
and collect only the text(including non-english texts like chinese/
japanese). The issue is I cannot use RichEdit component due to
various reasons. My question precisely is:

For example, I will take a rtf stream that has one japanese char "$B$R(B".
The stream for this would be: {\rtf1\ansi
\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\froman\fprq1\fcharset128
Arial Unicode MS;}{\f1\fswiss\fcharset0 Arial;}}{\*\generator Msftedit
5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20\'82\'d0\f1\par}

I want to convert that string to unicode. I can parse the rtf but I
will need some API to convert (charset128, 0x82d0) to 0x3072 (0x3072
is unicode for "$B$R(B"). Can you please let me know how this can be
done? Are there any WindowsAPIs that precisely does this conversion?

Thanks in advance
Sathish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top