Degree symbol on Windows

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)

I also tried:

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

but that gives me an "x " instead.

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

textArea.selText = &uB0

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

That did it Massimo. Thanks!

[quote=168654:@Patrick Besong]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)[/quote]
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)

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

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

Dim UnicodeDegree As String = &u00B0
Dim TheSame As String = “°” // Copied from Wayne’s line :slight_smile:

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 :slight_smile:

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!

On my Windows 10 Pro (1903), I have a Table des caractres (Characters Table) that display characters.

BTW: I run a MacBook Pro / VirtualBox !

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.