° (degree) in c# String

Does somebody know how to display ° on the screen of DisplayT35??
My variable is String. (I use SimpleGraphics.DisplayText of Display_T35 of .NetGadgeteer.)
I’m looking for it in the internet for at least one hour but didn’t find a solution…

According to http://www.asciitable.com/ the degree symbol is a part of the extended ASCII codes. Using the Extended ASCII table currently has issues when attempting to resolve the length of the string. It will cut off the last char in your string for every extended ascii char you have in your string. This is an issue with the NETMF core, and has been reported to microsoft.

However, you can always call any character by it’s HEX code, 0x–

display_T35.SimpleGraphics.DisplayText(“The temperature is 13 °F”, System.Resources.GetFont(System.Resources.FontResources.NinaB), Color.Black, 0, 0);

To display the ° symbol, type 0176 while holding down the “ALT” key on your keypad.

1 Like

While holding down ALT key, it’s not possible to enter something :frowning:
I tried it also with Alt Gr but then only }{ appears…

the alt key codes only work with a keyboard with a seperate numeric keypad.

1 Like

That works!
Thank you very much!


I tried the same with another font that I have created with tiny tool. And now ° isn’t shown with ALT + 0176.

You probably did not include the ° character in the TinyFont when converting the True Type Font. Look at the attached picture an make sure you include the degree symbol in the TinyFont generated by the Tool.

OK. Thank you!

Perfect! Just what I was looking for!