Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Re3: Latin-1 characters and XML

by kilinrax (Deacon)
on Apr 30, 2003 at 23:35 UTC ( #254532=note: print w/replies, xml ) Need Help??

in reply to Re3: Latin-1 characters and XML
in thread Latin-1 characters and XML

It doesn't to me seem entirely implausible that a module that can convert escaped, latin-1 characters into unicode could also manage the reverse process. It's a fairly reasonable thing to want to do, after all.
Incidentally, I did try looking at XML::Writer (which I'd assume is one of the many), and it didn't seem to have a method to do this either.
As it happened, I ended up using Unicode::String and a regex ( 's|([\200-\377])|sprintf("&#%i;", ord($1))|ge' ), which works, afaict.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2022-01-28 21:40 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (73 votes). Check out past polls.