locked
Problem displaying a partcular unicode character RRS feed

  • Question

  • I found the Unicode character to display the pi symbol as U+iD70B but when I try to use it vb does not like the format.

    In the past I have worked with many Unicode symbols using their code. ie the code for the square root symbol is &H221A and all I do is

    Dim u2 as Char = ChrW(&H221A) and it works fine!  Can someone tell me what I am missing?

    Thanks,

    Les

    Sunday, July 19, 2020 5:39 AM

Answers

  • To display U+1D70B, try this:

       Label1.Text = ChrW(&HD835) & ChrW(&HDF0B)

    • Marked as answer by Les2011 Sunday, July 19, 2020 4:20 PM
    Sunday, July 19, 2020 6:28 AM

All replies

  • Hi

    Well I have been looking for representations of the symbol for pi and one that's kind of nice is

    &H213C which is very nice but its like double blocked.  I have tried the symbol you provided here in the past but the one above is a lot more noticeable.  Upon further looking is where I came across the following which I will attach as a picture.  Is there a way of converting the Unicode I had provided into a usable format?

    Anyway I want to thank you for your suggestion and help

    Les

    Sunday, July 19, 2020 6:18 AM
  • To display U+1D70B, try this:

       Label1.Text = ChrW(&HD835) & ChrW(&HDF0B)

    • Marked as answer by Les2011 Sunday, July 19, 2020 4:20 PM
    Sunday, July 19, 2020 6:28 AM
  • Hi Viorel,

    Yes this works!  I have no idea why or how you came up with that solution <S>.  You or someone needs to explain to me how you accomplished that.

    Thanks

    Les

    Sunday, July 19, 2020 2:24 PM
  • A series of supplementary characters that are greater than FFFF (which is the maximal value of a character variable in VB) can be represented as two codes called “surrogate pairs”.

    The corresponding pair for U+1D70B can be found in various tables (e.g.: https://www.fileformat.info/info/unicode/char/1D70B). There is also a formula.

    Sunday, July 19, 2020 4:04 PM
  • Thanks Viorel I will check out the site you referenced, good job and thx

    Les

    Sunday, July 19, 2020 4:20 PM