Last post Oct 05, 2006 05:48 AM by Caddre
Oct 04, 2006 12:06 PM|stephen_k_walsh|LINK
How do I convert a Unicode character to an RTF charset character? I want to write a Russian string to a mostly English RTF file from .Net. I have experimented by pasting the string into the RTF file using Word. Word declares charset204, i.e. cyrillic, and
converts each cyrillic character to a hex number, e.g the cyrillic character К (unicode 0x041A) is converted to \'ca.
Oct 04, 2006 06:19 PM|Caddre|LINK
The .NET Char is Unicode by default so you may be able to do it, if you cannot do it with the code in the link below then post again so I can show you how to do it with SQL Server collation. Hope this helps.
Oct 05, 2006 03:08 AM|stephen_k_walsh|LINK
Thanks for the link. It looks like a lot of useful stuff.
The System.Text.Encoding class will give me an encoding for an HTML page, but I can't see how to relate that to the \fcharset204 (cyrillic) that is used in the RTF file. Do you know where there is a definition of the charsets, i.e. the actual characters, rather
than just the languages, used in RTF? If this can actually be done with SQL Server collation that would be useful.
Oct 05, 2006 04:37 AM|stephen_k_walsh|LINK
Thanks for the pointer. I've done a little more digging and testing. It turns out that the RTF fcharset 204 is the same as codepage 1251 so I can use the System.Text.Encoding class to do the conversion after all.
Oct 05, 2006 05:48 AM|Caddre|LINK