0

I'm trying to convert this ü to ü in php.

I want to get this kind of characters to correct format. this is Germany characters format. somehow the database recode is like this. but it's not a correct format.

here is my code,

//Germany
$text = "Italienische Gemüsesuppe";
setlocale(LC_ALL, 'de_DE'); 
$trans_sentence = iconv('UTF-8', 'ASCII//TRANSLIT', $text);
//correct format should be like this : Italienische Gemüsesuppe

But this is not working as expected.

How do i do it ?

Ashan
  • 479
  • 7
  • 28
  • ASCII doesn't have Umlauts. If anything, Latin-1 / utf8_decode would be an option. Better yet, use UTF-8 all around. – mario Feb 26 '19 at 19:37
  • I found the solution, removed character encode from PDO connection //$this->set_charset("utf8"); – Ashan Feb 26 '19 at 20:05

0 Answers0