0

I'm using Slovenia characters and PHP MySQL select where clause to fetch results from the database. This query is working properly with English letters but has an issue with Slovenia letters like (ć, č, đ, š). I have set database collation to utf8_slovenian_ci. And encoding of php files is utf8

AsadMalik
  • 29
  • 6
  • Is the _connection_ using utf8? What is the hex of the text in the database? See https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored – Rick James Jan 20 '21 at 19:13

1 Answers1

0

I don't know how Slovenia characters are processed, but try this (it worked with Arabic characters):

$string = "ćčđš";
$mysqlEscaped = mysqli_escape_string($string);
Evara
  • 84
  • 2
  • 11