1

I'm trying to convert Ágætis character to normal letters but getting �g�tis.

echo "<tr><td>"; 
echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE', $CDTitle);
echo "<div> 
<a href = \"editCDForm.php?itemCode=$iCDID\">$CDTitle</a> 
</div>\n";
echo "</td><td>";   
echo $row['CDYear'];
echo "</TD></tr>"; 
Doran L
  • 299
  • 2
  • 5
  • 19
  • Á is a normal letter. Converting it to **A** is like converting **a** to **z** –  Nov 02 '15 at 08:14

3 Answers3

0

Try This

  iconv('utf-8', 'ascii//TRANSLIT', $CDTitle);

How to convert special characters to normal characters?

Community
  • 1
  • 1
Salah
  • 139
  • 6
  • I try that but i got -> Notice: iconv(): Detected an illegal character in input stringecho. I was also trying with -> setlocale(LC_ALL, 'en_US.UTF8'); but it doesn't work. – Doran L Nov 03 '15 at 06:17
0

Reference Try php iconv

echo iconv('utf-8', 'ascii//TRANSLIT', 'Ágætis');

Demo

iconv — Convert string to requested character encoding

string iconv ( string $in_charset , string $out_charset , string $str )

Community
  • 1
  • 1
Abhishek Sharma
  • 6,689
  • 1
  • 14
  • 20
0

Thanks all, the below help to resolve converting the character

header('Content-type: text/html; charset=iso-8859-1');

Doran L
  • 299
  • 2
  • 5
  • 19