I read unicode block string from the Wikipedia site 'https://en.wikipedia.org/wiki/Specials_(Unicode_block)', but it had nothing to do with coding, and how to dont remove sometimes appears symbols like "�", Because this string doesn't know on the PHP language.
This is my Code (php):
<?php
$str1 = 'Apple iPhone X , 64GB , Space Gray';
$title1 = substr($str1, 0, 15) . '...';
echo str_replace('/[\s]+/','',$title1);
echo '<br>';
$str2 = 'ipod اجدد اصدار من ابل';
$title2 = substr($str2, 0, 15) . '...';
echo str_replace('/[\s]+/','',$title2);
?>
out :
Apple iPhone X ...
ipod اجدد �...
How to remove question mark '�'?