Displaying a degree symbol on a web page
I have a program that extracts GPS coordinates from metadata and imports the results into a database. Then I display the data using PHP on the web page.
My problem. I recently created a new template, but for some reason it no longer shows the degrees symbol "°" but "".
It just seems odd to me that it works with one template but not another?
I tried changing fonts but no luck
source to share
See DEGREE CHARACTER .
Specifically, the HTML the Entity: °
.
Make sure you have the proper docstring and character encoding in both templates to make sure they are correct.
source to share
When entering or retrieving data from a database, use htmlentities()
you can find a good guide on this function a here http://php.net/manual/en/function.htmlentities.php
source to share
You can use:
utf8_encode('YOUR TEXT');
utf8_encode converts string data from ISO-8859-1 encoding to UTF-8.
source to share