Hi,
"perl -p -i -e 'BEGIN {print %x "EFBBBF" }' default.xml
Can't find string terminator "'" anywhere before EOF at -e line 1."
Can't find string terminator "'" anywhere before EOF at -e line 1.
How to do it with this PERL line?
%x prints hexa, but it does not work.
On Wed, Jun 03, 2015 at 08:16:52AM +0000, Nagy Tamas (TVI-GmbH) wrote:
> Hi,> > Ok, but how to write the „EF BB BF“ BOM code to the beginning?> With XML::Writer the print OUTPUT chr(65279) does not do anything.> > my $output;> my $writer;> > $output = IO::File->new(">default.xml");> > $writer = XML::Writer->new(OUTPUT => $output, DATA_MODE => 1, DATA_INDENT => " ", ENCODING => "utf-8", NEWLINES => 0 );> > binmode(OUTPUT, ":utf8");> print OUTPUT chr(65279); #BOM
Shouldn't that be
binmode($output, ":utf8");
print $output chr(65279);
?
I'd probably use File::BOM however
Karl
_______________________________________________
Perl-XML mailing list
Perl...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-XML mailing list
Perl...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs