how to remove spurious non ascii characters, but keep spaces and newlines?

Biplobhop

New Member
I have some text files that contain some non ASCII characters, I want to remove them, however keep the formatting characters.I tried \[code\]$description = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $description);\[/code\]However that appeared to strip newlines and other formatting out and also had problems with some Hebrew which then converted this\[quote\] ?????? ?????? ???????. ??? ?????! ?? ????? ??? ********************* ??? - ????????? ?????? ?????? ?? ?? ??? ?????? ??? * NEW to version 1.1 - the expert talks!!! *\[/quote\]to this\[quote\] 1.4 :", ..."" ..."" 50 ..." . , . ! ********************* - * NEW to version 1.1 - the expert talks!!! *\[/quote\]
 
Back
Top