0

My production server have iconv encoding set in php.ini as the following:

iconv.input_encoding    ISO-8859-1  ISO-8859-1
iconv.internal_encoding ISO-8859-1  ISO-8859-1
iconv.output_encoding   ISO-8859-1  ISO-8859-1

wheres

iconv.input_encoding    no value    no value
iconv.internal_encoding no value    no value
iconv.output_encoding   no value    no value

The issue is that on my production server Im unable to run my script which convert a string including some special characters to regular characters, in this case smart quotes to regular quotes. “test” to "test".

I tried this but didn't work. Can someone shed some light please. Thanks

 $output = iconv('UTF-8', 'ASCII//TRANSLIT', $input);
 $output = iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $input);

I used mb_detect_encoding and detected input was ASCII. My server is set to ISO-8859-1.

user2700690
  • 563
  • 3
  • 11
  • 25
  • possible duplicate of [How to replace Microsoft-encoded quotes in PHP](http://stackoverflow.com/questions/1262038/how-to-replace-microsoft-encoded-quotes-in-php) –  Mar 05 '15 at 21:33
  • @Dagon I saw that before I posted. I tried it but didnt work for me. Right now Im using $output= iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $input); and its basically removing smartquotes – user2700690 Mar 05 '15 at 21:39

0 Answers0