I have some text files that contain some non ASCII characters, I want to remove them, however keep the formatting characters.
I tried
$description = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $description);
However that appeared to strip newlines and other formatting out and also had problems with some Hebrew which then converted this
משפטים נוספים מהמומחה. נסו ותהנו! חג חנוכה שמח **************************************** חדש - האפליקציה היחידה שאומרת לך מה מצב הסוללה שלך ** NEW to version 1.1 - the expert talks!!! *
to this
1.4 :", ..."" ..."" 50 ..." . , . ! **************************************** - ** NEW to version 1.1 - the expert talks!!! *