Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: XML::Simple parser error : Input is not proper UTF-8, indicate encoding

by nvivek (Vicar)
on Aug 17, 2012 at 05:31 UTC ( #987911=note: print w/replies, xml ) Need Help??


in reply to Re: XML::Simple parser error : Input is not proper UTF-8, indicate encoding
in thread XML::Simple parser error : Input is not proper UTF-8, indicate encoding

I solved the problem by replacing non-printable characters to nil, before writing to XML file. My regular expression is as follows.
# following is a code to remove non-printable characters in string i +ncluding newline s/[^[:print:]]+//g; # this pattern won't remove newline char s/([\x00-\x09]+)|([\x0B-\x1F]+)//g;
  • Comment on Re^2: XML::Simple parser error : Input is not proper UTF-8, indicate encoding
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987911]
help
Chatterbox?
[ambrus]: Now it has five people instead of three, some sort of call number ticket system where people wait a lot for their food to get ready (it's the same kinds of grilled meat and fish on the same equipment, it won't actually fry slower),
[ambrus]: it's slow as hell, and the food costs significantly more.
[ambrus]: We no longer eat there.
LanX Everybody quotes it, some people read it, and a few people go by it
[ambrus]: LanX: why would I read it? isn't it a book for managers? I don't want to be a manager.
[ambrus]: I don't quote it either.
[erix]: it's really a software book, albeit about experiences from the 60s-80s. People haven't changed all that much though.
[erix]: a software project book, is probably more exact
[ambrus]: Yes, but I'm not managing software teams either.
[ambrus]: I'm not only not a restaurant manager, but also not a software manager.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2017-09-22 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (264 votes). Check out past polls.

    Notices?