Hi,
We are experiencing problems with embedded control characters in our EAM application Ellipse. It is not causing a problem with the online system but it is with CSV extracts and print jobs. I have been able to get around the problem on the CSV extracts using the UNIX function 'tr' before unblocking the file but do not know how to handle the print jobs. Printing from the application is handled by a Perl script, see part of code below. The problem is print jobs have a ^M at the end of the line so stripping out control characters will remove the valid ^M at eol. Can someone with more Perl experience than myself please suggest a way of stripping out embedded control character while maintaing the ^M at eol. The line length can be 80 or 132 chartacters.
Many thanks in advance.
if ($m_no == 0 ) { # very first report line
$m_line =~ s/^L//g;
if ($m_line !~ /^M\n/) {
$m_line =~ s/\n/^M\n/g;
}
print F_OUTFILE $m_line;
}
else { # subsequent lines of report
if ($m_line !~ /^M\n/) {
$m_line =~ s/\n/^M\n/g;
}
print F_OUTFILE $m_line;
};
We are experiencing problems with embedded control characters in our EAM application Ellipse. It is not causing a problem with the online system but it is with CSV extracts and print jobs. I have been able to get around the problem on the CSV extracts using the UNIX function 'tr' before unblocking the file but do not know how to handle the print jobs. Printing from the application is handled by a Perl script, see part of code below. The problem is print jobs have a ^M at the end of the line so stripping out control characters will remove the valid ^M at eol. Can someone with more Perl experience than myself please suggest a way of stripping out embedded control character while maintaing the ^M at eol. The line length can be 80 or 132 chartacters.
Many thanks in advance.
if ($m_no == 0 ) { # very first report line
$m_line =~ s/^L//g;
if ($m_line !~ /^M\n/) {
$m_line =~ s/\n/^M\n/g;
}
print F_OUTFILE $m_line;
}
else { # subsequent lines of report
if ($m_line !~ /^M\n/) {
$m_line =~ s/\n/^M\n/g;
}
print F_OUTFILE $m_line;
};