X-Git-Url: http://git.projectaon.org/?p=project-aon.git;a=blobdiff_plain;f=common%2Fscripts%2Fxmlize.pl;h=063bd05626d98e414774b7bcaccb7f15c1a04f88;hp=349d37dc6945e31bddf7ca200ac6d61a318e5e88;hb=93b6ee167006f78af6e039103055d935ba1822a4;hpb=b571a455f174e4ba0cde9f3e98ad09c60e24f95c diff --git a/common/scripts/xmlize.pl b/common/scripts/xmlize.pl index 349d37d..063bd05 100755 --- a/common/scripts/xmlize.pl +++ b/common/scripts/xmlize.pl @@ -8,6 +8,7 @@ use strict; use warnings; use utf8; use open ':encoding(UTF-8)'; +use open ':std', ':encoding(UTF-8)'; my $FILE_EXTENSION = 'txt'; my $BASE_INDENT = ' '; @@ -121,6 +122,10 @@ print << "(End of XML footer)"; sub xmlize { my( $inline, $infile ) = @_; + if(!defined $inline || $inline eq "") { + return ""; + } + $inline =~ tr/\t/ /; $inline =~ s/[[:space:]]{2,}/ /g; $inline =~ s/[[:space:]]+$//;