Degree symbol on Windows

  1. 5 years ago

    I cannot seem to find the right code for a degree symbol on Windows. I tried Chr(248) as that's the ascii code but I keep getting a theta symbol which should be 157. I used this site as reference: http://www.theasciicode.com.ar/extended-ascii-code/degree-symbol-ascii-code-248.html
    my code:
    textArea.selText = Chr(248)

  2. I also tried:

    textArea.selText = Encodings.ASCII.Chr(248)

    but that gives me an "x " instead.

  3. Brock N

    18 Feb 2015 Pre-Release Testers, Xojo Pro

    167 shows degree for me, not 157. But I'm also on a mac.

  4. Massimo V

    18 Feb 2015 Pre-Release Testers, Xojo Pro Europe (Germany, Würzburg)
    Edited 5 years ago
    textArea.selText = &uB0

    http://www.fileformat.info/info/unicode/char/b0/index.htm

  5. That did it Massimo. Thanks!

  6. Norman P

    18 Feb 2015 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    @Patrick B I cannot seem to find the right code for a degree symbol on Windows. I tried Chr(248) as that's the ascii code but I keep getting a theta symbol which should be 157. I used this site as reference: http://www.theasciicode.com.ar/extended-ascii-code/degree-symbol-ascii-code-248.html
    my code:
    textArea.selText = Chr(248)

    ASCII is a 7 bit encoding and only has characters from code point 0 to 127
    Anything beyond that is some other encoding
    Your reference site is incorrect in referring to it as "extended ascii" - there are many different ones.
    Wikipedia gets this right http://en.wikipedia.org/wiki/ASCII#8-bit

    There are other encodings - iso latin 1, latin 2 etc, windows 1252, etc that use "ascii" as the base 128 characters and then have difference pages where bit 8 is set (code points 128 to 255)

  7. Michel B

    18 Feb 2015 Pre-Release Testers, Xojo Pro RubberViews.com

    The only absolute reference in matters of symbols is Unicode. The jungle of encodings is better forgotten, in an age of UTF-8 strings.

  8. Wayne G

    18 Feb 2015 Pre-Release Testers, Xojo Pro New Zealand axisdirect.nz

    What's wrong with Alt + 0176 ° on the keyboard?

  9. Rick A

    18 Feb 2015 Pre-Release Testers (Brazil. GMT-3:00)
    Edited 5 years ago

    Dim UnicodeDegree As String = &u00B0
    Dim TheSame As String = "°" // Copied from Wayne's line :)

  10. Michel B

    18 Feb 2015 Pre-Release Testers, Xojo Pro RubberViews.com
    Edited 5 years ago

    @Wayne G What's wrong with Alt + 0176 ° on the keyboard?

    The Alt numeric keyboard routine is using the position of the character in CP-1252 Windows encoding. It works only for character positions up to 256. Unicode accesses all characters in the font, for instance &uFBE4 position 5054, last character in SegoeUI.

    Using Unicode guarantees it will be perfectly cross platform (as long as the glyph is in the target font).

    That said, ° is a direct key on the French keyboard :)

  11. 5 weeks ago
    Edited 5 weeks ago

    It's simple. Hold down the Alt key, and on the numeric keypad on the right of the keyboard, type 0176 or Alt+ 248 °

    More devices: https://www.degree-symbol.com/article/degree-symbol-on-iphone-ipad

    Have good forums!

  12. Emile S

    Sep 15 Europe (France, Strasbourg)

    On my Windows 10 Pro (1903), I have a Table des caractères (Characters Table) that display… characters.

    BTW: I run a MacBook Pro / VirtualBox !

  13. Michel B

    Sep 15 Pre-Release Testers, Xojo Pro RubberViews.com

    Actually, on an English Windows, it is called "Character Map" and it is in the Start Menu Windows Accessories.

    The degree symbol is in the default Unicode character set, as well as Windows: Western.

or Sign Up to reply!