Clear all

[Solved] I can't figure out a character in webserver

3 Posts
2 Users
Reputable Member
Joined: 3 years ago
Posts: 348
Topic starter  

I am running an ESP32 and have a simple webserver. It is displaying the current temperature and humidity. It is temporary and will be removed after testing.


The problem is that when I try to use the degree symbol(°, copied and pasted from a website, I have tried a few) I get an A character. The variable is a float but it's just the simple string with °C that causes it. Since it's for testing, there is no formatting. Any ideas on this?


//what I get is 



Noble Member
Joined: 2 years ago
Posts: 925

Hi @madmisha,

  Sorry, I don't have an answer to what is happening in your case, and I can't quickly simulate the client.print (), but I hoped it should be the same as a more 'conventional' web task, assuming client.print() just blindly transmits the same characters, and it is the web browser that does the interpretation.

   A quick Google served up a discussion on how to do the degree sign with a couple of answers:

And a quick trial on 'Try me' seemed to work.

<!DOCTYPE html>

<p>My room temperature 20&deg;C</p>


 So maybe this would work on your embedded system?

Good luck and best wishes!

Reputable Member
Joined: 3 years ago
Posts: 348
Topic starter  


That worked perfectly. I guess my google foo is off today. I kept looking up examples since that kind of project has been done to death and they all just put an F after the temp and that just wasn't working well with my OCD. I guess that was why. Thanks.

DaveE reacted