converting UCS2 character code to a string

  • Thread starter Thread starter PEACEMAKER
  • Start date Start date
P

PEACEMAKER

I have a bunch of ucs2 character code reference numbers like 672c. Is there
an easy way to convert these to a c# string so that when it is printed out
in the appropriate font it displays the character?
 
PEACEMAKER said:
I have a bunch of ucs2 character code reference numbers like 672c. Is there
an easy way to convert these to a c# string so that when it is printed out
in the appropriate font it displays the character?

You can cast an int to a char (although you'll get unwanted results if
the value is > 0xffff). You can create a string from an array of chars,
or you could use a StringBuilder and repeatedly call Append, for
example.
 

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

Back
Top