The degree character is displayed correctly in the database however it is not displayed correctly on this page.
https://www.northerngauge.com/products/api-6a-bpv-thread-gauges
When I add this content (1-1/4" 4 BPV 90° LH GO PLUG GAUGE) to the page directly in the html, it displays correctly so it is not the page charset: charset="utf-8".
Something is modifying the character between fetching in the database and displaying on the page.
Any ideas why this is happening?
degree character not recognized in html
3 years ago
3 years ago
#1
3 years ago
#2
The degree symbol needs to be stored in the database as:
3 years ago
#3
Thank you disco_2_disco.
When I add htmlentities to the post helper function, it doesn't recognize the degree character (or any other special character) and returns \ufffd.
When I add htmlentities to the post helper function, it doesn't recognize the degree character (or any other special character) and returns \ufffd.
3 years ago
#4
For anyone else that comes across this issue, here is how I resolved it:
In the post function in form_helper.php, I added htmlentities and flags:
In the post function in form_helper.php, I added htmlentities and flags: