Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Cleaning up non 7-bit Ascii Chars for XML-processing

by ikegami (Patriarch)
on Nov 11, 2010 at 19:06 UTC ( [id://870917]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub encode_entities {
        my ($self, $text) = @_;
    ...
        $text =~ s/([^\x20-\x7E])/sprintf("&#x%X;", ord($1))/eg;
        return $text;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://870917]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found