Results 1 to 4 of 4

Thread: Howto convert unicode to char?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    Howto convert unicode to char?

    I have the following hexadecimal representation of a unicode character 2211

    How can this be converted to a unicode chatacter?

    I have searched the system.text.convert namespace... but found nothing useful

    kind regards
    Henrik

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    Is this usefull?
    VB Code:
    1. MsgBox(Asc(ChrW(2211)))

    This will return 63.

    According to The Help ChrW functions takes a unicode and returns a Char.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    2211 is the unicode hexadecimal representation of the "sum"character (the greece letter)... I don't think it is represented in ascii. I need som way to print this in a math program im doing...


    kind regards
    HEnrik

  4. #4
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    in my first post, I didn't realize that it was hex, but still, it shouldn't matter.

    VB Code:
    1. MsgBox(ChrW(&H2211))

    This will show a msgbox with the "sum" character. so this should also apply to labels and textboxes. And if you're using DrawString to draw to a graphics object, e.i. a printdocument, I would expect it to work as well, assuming the font you're using are correct.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width