Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: How to remove error: Code point \u0016 is not a valid character in XML

by Perl300 (Friar)
on Jun 30, 2015 at 20:49 UTC ( [id://1132707]=note: print w/replies, xml ) Need Help??


in reply to Re: How to remove error: Code point \u0016 is not a valid character in XML
in thread [Solved]:How to remove error: Code point \u0016 is not a valid character in XML

Thank you for your response graff. Finally I was able to remove the character that was causing this error "Code point \u0016 is not a valid character in XML".

I just added some code before

my $out = IO::File->new()

The code I added is as below:

`strings $20150625163139.txt > Temp.txt`; my $temp_file = "Temp.txt"; open($fh, ">", $20150625163139.txt) or die "Could not open file '$file +name' $!"; open(my $fh1, "<", $temp_file) or die "Could not open file 'Temp.txt' +$!"; while(<$fh1>){ print $fh $_; } close $fh; close $fh1; unlink $temp_file;

So "strings $filename > Temp.txt" removes that character causing error and like many occasions UNIX came to my help this time as well :-)

Thanks you all for your inputs! If there is any way to mark a node as closed, please let me know and I'll mark this one as closed.

Replies are listed 'Best First'.
Re^3: How to remove error: Code point \u0016 is not a valid character in XML
by choroba (Cardinal) on Jul 01, 2015 at 05:47 UTC
    The usual way is to update the original question's title with (Solved).
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-23 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found