Page 1 of 1

string with special char to RTF

Posted: Wed Apr 14, 2010 3:48 pm
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

Posted: Wed Apr 14, 2010 5:57 pm
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

Posted: Wed Apr 14, 2010 6:40 pm
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.