|
-
July 6th, 2011, 09:31 PM
#1
Remove unprintable characters
I'm having problems with unprintable characters in XML that's been copied and pasted in. Mostly character code 160 (decimal), seems to be the problem.
I was trying to remove them all with a regular expression:-
xml = XML(xml.toXMLString().replace(/(\x00-\x1F)|(\x7F-\xFF)/g,''));
But this has no effect whatsoever. Does anyone have a solution? (apart from a primitive loop that traverses and examines every .charCodeAt(i))
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|