cooldude832 Posted January 26, 2008 Share Posted January 26, 2008 I got a text file I'm reading and I'm getting a bunch of those ? in black boxes suggesting those characters are illegible by my system can regex remove this for me? Link to comment https://forums.phpfreaks.com/topic/87874-removing-characters-that-the-system-cant-phrase/ Share on other sites More sharing options...
laffin Posted January 26, 2008 Share Posted January 26, 2008 Dun see why not preg_replace("@[^\s\x21-\x7e]@i",'',$body); Link to comment https://forums.phpfreaks.com/topic/87874-removing-characters-that-the-system-cant-phrase/#findComment-449662 Share on other sites More sharing options...
effigy Posted January 28, 2008 Share Posted January 28, 2008 Should they be removed? Perhaps it's in UTF-8. What are they? Use a hex editor or Unix's od. Link to comment https://forums.phpfreaks.com/topic/87874-removing-characters-that-the-system-cant-phrase/#findComment-451254 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.