tags:

views:

70

answers:

1

Please see here for a related question.

However, char goes to 0xffff (or 65535). I need to write 0xd800df46 (or 66374), Gothic letter Faihu, so casting that int to char will not work. I do the conversion ok, that is, I get the correct integer, meaning I calculate the surrogate pairs ok, but I don't know how to "render" it, convert it to a character to be output as a glyph.

Please notice that I cannot use \Unnnn for ... well, theoretical reasons.

Thank you.

+2  A: 

Okay, you need to convert a single integer into a surrogate pair which you'd represent as a string:

string x = char.ConvertFromUtf32(66374);

For more operations than that, you can use my Utf32String class in MiscUtil, as well as various other methods in System.Char.

Jon Skeet
Thanks, Jon. This will do.
Dervin Thunk