Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to encode Degree Celsius symbol into web page?

Tags:

html

symbols

How should I encode special characters into web pages? For instance I need this symbol ℃, which I used just by copying and pasting the character as I can see it now. This worked for the desktop browsers I checked with and also on iPad and iPhone but nothing is displayed on a Blackberry I used for testing. Is there a standard best practice for this?

http://www.fileformat.info/info/unicode/char/2103/browsertest.htm

like image 248
Evanss Avatar asked May 29 '12 10:05

Evanss


1 Answers

Try to replace it with °, and also to set the charset to utf-8, as Martin suggests.

°C will get you something like this:

Degrees Celsius

like image 89
Nix Avatar answered Nov 10 '22 22:11

Nix