Does the PlatformIO Serial Monitor support the ASCII extended character set?


I’m working on a weather program using an ESP8266 and trying to print the degree symbol (ASCII code 176) to the PlatformIO Serial Monitor. When I print the character, I see a black diamond with a question mark in the center.

My question is, does the Serial Monitor support the ASCII extended character set?

This is the print statement I’m using: Serial.println(’\xB0’);

I also tried Serial.write(0xB0) along with other variations with the same result.

Serial.println(’\x41’) prints the character A as expected.



Works for me

But I also activated UTF8 support in Windows a long time ago.

Ah, I see that you did it a bit differently than I did.

I was doing it by printing the ASCII hex character code in the print statement:
Serial.print("Wind dir: "); Serial.print(wind_deg); Serial.println("\xB0");

But I see that you embedded the character in the line as:
Serial.print("Wind dir: "); Serial.print(wind_deg); Serial.println("°");

Your way works for me also. But could you try it by using the ASCII character code in the print statement as I was originally doing and let me know if that works?



This is producing the UTF-8 encoding for me U+00B0 = 0xc2 0xb0,


Does not decode correctly since my terminal locale is UTF-8 / codepage 65001.

As expected due to the encoding mismatch.

Okay, thank you for trying.