0

Currently I have a XAMPP server and MySQL database related to it. The database has some data that has superscript charactors such as ™. I used some form to insert such data into database. In database it has been showing as â„¢. But when I query, then it shows correctly as ™ in the HTML page.

My Issue

I created the same database in another XAMPP server and transferred data by exporting from original MySQL database and import to new MySQL database. All data transferred correctly. But this time, when I query the special charactor and showed in HTML page, it is not showing the superscript charactor as ™, instead it shows as â„¢.

When I export data, I used utf-8 too

enter image description here

But when I tried to add a new data with ™ in it by using query into the new MySQL database and such added data is showing correctly as ™ instead of â„¢. But those imported data is still not showing correctly in HTML page.

I tried to add mysqli_set_charset($conn,“utf8”) in the connection file. But it is not solving the issue.

Does anyone know why this way?

Anu
  • 1,123
  • 2
  • 13
  • 42
  • There's a number of settings you'll need to align with `utf8`, or today, `utf8mb4` to support the full range of UTF-8 characters including emoji. – tadman Aug 18 '20 at 02:37
  • If you're seeing ™ show up as multiple characters that's a sign that you're doing accidental 8-bit conversion somewhere in the process to Latin1 or Windows-1252. – tadman Aug 18 '20 at 02:38
  • @tadman But may i know why this issue happening only when I import the database, but not seeing if i create the data using query? – Anu Aug 18 '20 at 08:52
  • It's due to mismatched types somewhere. Maybe your importer is not on the same page. Possibly your front end is completely broken, but consistently broken, so you don't notice. – tadman Aug 18 '20 at 08:52

0 Answers0