1

this is stored in my mysql database

<p>it&acirc;&euro;&trade;s the best</p>

I am fetching this from database and displaying to webpage. But "it's the best" is displayed as "it’s the best".

How can i show apostrophe on the webpage?

I want everyone who access my website see the apostrophe irrespective of browser and os.

karan
  • 190
  • 1
  • 3
  • 9
  • 1
    share your codes too.. – Rohit Kumar Oct 12 '15 at 10:58
  • which exotic encoding are you using? – Federkun Oct 12 '15 at 11:01
  • `’` *is* the HTML code for `’`. You already have corrupted data in your database. You can try to repair by decoding all HTML entities to their 'ISO-8859-1'-encoded characters. The resulting string will likely be a valid UTF-8 string. – roeland Oct 12 '15 at 22:14

1 Answers1

1

when so ever you find such special character issues from the database. Always follow some basic steps like below:

  1. check the column collation to be utf8_general_ci.
  2. run the query "SET NAMES utf8" before your actual query.
  3. set the content headers to utf-8 or try with ISO-8859-1

if still it doesn't help, then please paste/describe your code while asking the questions.

Ashish Choudhary
  • 2,004
  • 1
  • 18
  • 26