Are there alternative methods to utf8_decode for converting special characters to their correct representations in PHP7 without affecting other characters in the text?

When using utf8_decode in PHP, it converts special characters to their correct representations but also affects other characters in the text. To address this issue, you can use the iconv function in PHP to specifically convert special characters to their correct representations without altering other characters in the text.

// Input text with special characters
$inputText = "Th\u00e9r\u00e8 \u00e4r\u00e9 sp\u00e9ci\u00e4l ch\u00e4r\u00e4ct\u00e8rs";

// Convert special characters to their correct representations
$outputText = iconv('UTF-8', 'ASCII//TRANSLIT', $inputText);

// Output the converted text
echo $outputText;