Do you know where your variables are? | |
PerlMonks |
Detecting ASCII Characters embedded within text stringby onegative (Scribe) |
on Jan 28, 2011 at 16:25 UTC ( [id://884871]=perlquestion: print w/replies, xml ) | Need Help?? |
onegative has asked for the wisdom of the Perl Monks concerning the following question:
Good day Monks,
I have a problem and not sure how to handle. Seems like I am finding ASCII characters embedded within text strings, mostly likely introduced during cut/paste into application fields during configurations. These are unseen within the application fields and typically show up as a space and not easily identified visually. The problem is that the data once retrieved from the configurations are being passed into my code and when I build the xml (even CDATA) it is cratering the XML parsers which later process the file. My guestion is how would I globally detect that an ASCII character is embedded in the string and either remove or convert accordingly. Not knowing what may be there is the challenge for me...and how to address it through some function to eliminate or convert. Any ideas or best practice would be GREATLY appreciated. Thanks, Danny
Back to
Seekers of Perl Wisdom
|
|