0

My database used to display text normally. Now, for some reason it is displaying some text characters in a funny way. For example, the apostrophe

' is displayed as ’ - is displayed as —

I didn't update anything in my database, so that is why I am wondering how this could have happened.

Divern
  • 343
  • 2
  • 15
  • Possible duplicate of ["’" showing on page instead of " ' "](http://stackoverflow.com/questions/2477452/%c3%a2%e2%82%ac-showing-on-page-instead-of) – Blender Apr 12 '17 at 05:06
  • I looked at this question, and I think it is different. I have in my php file. I also checked the database and it is how it is stored. It was not like that 5 days ago. – Divern Apr 12 '17 at 05:10
  • Edit into your question a minimal example showing how you fetch the field from your database and display it on the page. What is the schema of your table (specifically the column you're reading from)? – Blender Apr 12 '17 at 05:35

1 Answers1

0

Try This..

 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  • I do have this at the top of my document. – Divern Apr 12 '17 at 05:11
  • mysql_query("SET COLUMN_NAME 'utf8'"); before adding/retreiving from the database. php function urlencode($text) was applied when displaying, so removed that . and also make sure that the headers for the page and the ajax request/response were all utf8. – SUBHAM MAJAVADIYA Apr 12 '17 at 05:30