I found a similar thread from 2012
https://forum.allaboutcircuits.com/threads/displaying-the-degree-symbol-in-code.130002
(and I note that @WBahn and @atferrari are still around)
but I just want to initialise a two character string to "°C", despite the protestations of the compiler (GNU C)
It won't accept \xB0C because it doesn't like a char greater than128.
it won't accept putting the string as individual char {0xb0,0x43,0}
nor does it work if I simply type "°C" because it puts in a 16-bit unicode character.
I'm trying to initialise it so that it goes in ROM with a pointer. When it was just an array of char, it was happy with {0xb0,0x43,0}.
Any ideas?
(It doesn't need to be portable, I really don't care about any other displays, just the one I'm using)
https://forum.allaboutcircuits.com/threads/displaying-the-degree-symbol-in-code.130002
(and I note that @WBahn and @atferrari are still around)
but I just want to initialise a two character string to "°C", despite the protestations of the compiler (GNU C)
It won't accept \xB0C because it doesn't like a char greater than128.
it won't accept putting the string as individual char {0xb0,0x43,0}
nor does it work if I simply type "°C" because it puts in a 16-bit unicode character.
I'm trying to initialise it so that it goes in ROM with a pointer. When it was just an array of char, it was happy with {0xb0,0x43,0}.
Any ideas?
(It doesn't need to be portable, I really don't care about any other displays, just the one I'm using)





