-1

I'm having an issue inserting phonetic pronunciations into my database. Here's some images showing what I've done, and the result at the end.

Here's my table layout :

enter image description here

I've added the header on the file that I'm running the script on :

enter image description here

On the web page, the encoding is fine :

enter image description here

Here's how it's uploaded into the database :

enter image description here

Thanks guys please give me some insight on what I'm doing wrong. I'm using phpmyadmin, and on the column for the ipa I'm using utf8mb4_bin

Arnaud Peralta
  • 1,287
  • 1
  • 16
  • 20
Felix
  • 13
  • 1
  • 1
  • 6

2 Answers2

0

I've solved it myself, because I'm using PDO I simply added charset=utf8 to the connection string

$DB = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8",$user,$pass);
DarkBee
  • 16,592
  • 6
  • 46
  • 58
Felix
  • 13
  • 1
  • 1
  • 6
  • Yes always make sure your DB connection, physical files and encoding of the output are the same – DarkBee Mar 09 '19 at 22:48
0

I would make sure that the connector is also set to utf8mb4:

e.g. $this->con->set_charset("utf8mb4");

But most of your answers should be here:

Kustodiev
  • 1
  • 2