string with special char to RTF

General TRichView support forum. Please post your questions here
Post Reply
icekiller
Posts: 2
Joined: Wed Apr 14, 2010 2:31 pm

string with special char to RTF

Post by icekiller »

Hi

Wonder if there is a change that I could get the/a routine converting or the rules for converting :

ex. Læge -> L \u230 \'e6ge

I want it because I want to do some text handling on a rtf file before loading into Richview.

I guess u have that converting routine allready so if It dont break any copy rights if I use the snip of code .


Br
Kim Pedersen
Structura Aps
icekiller
Posts: 2
Joined: Wed Apr 14, 2010 2:31 pm

Post by icekiller »

I found the solution myself , quite easy . sorry wasting peoples time

just check if ord values is <128 else use the ord value as kode
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can search web for "RTF specification'.
\uN specifies an Unicode character with code N; it may be followed by zero, one or several non-Unicode characters representing alternative for this character. The number of such characters is specified in preceding \ucN keyword.
\'N specifies a character by its code (non-Unicode), the charset of this characters depends on the font.

So, it's not just a simple ord value.
Post Reply