Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

• Suddenly Appearing instead of Bullets

I have a really simple form that takes a textarea and places the contents inside a MySQL database and then a website displays that information. Up until now everything has worked fine including special characters like apostrophes and bullets, however, all of a sudden now apostrophes cause the form to error out and bullets show up as this: •

All the pages are meta encoded as UTF-8, the database collation is UTF-8 and the text area string is being processed by the utf8_encode command.

What could cause this to suddenly happen?

I've been searching around on here for an answer and I can only find situations where people are missing UTF-8 on the database or on the web pages/forms. My only assumption is a PHP version update by the host, however, I cannot confirm that as they use a proprietary system that doesn't let me see the current running version number and I don't know if it would be affected in this way.

If it matters, the textareas are always wrapped in HTML pre tags for formatting.

like image 916
CdnXxRRODxX Avatar asked Oct 27 '25 10:10

CdnXxRRODxX


1 Answers

I'm obviously a little behind when it comes to char encodings - make sure you're correctly declaring the charset.

https://www.w3.org/International/questions/qa-html-encoding-declarations

html5 only requires <meta charset="utf-8">. If you're using this, make sure you also use <!DOCTYPE html> at the top of your html, otherwise you may run into HTML4 issues where <meta charset="utf-8"> won't work.

like image 169
Noah Kiss Avatar answered Oct 30 '25 01:10

Noah Kiss



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!