Non-ASCII characters were not being decoded before being
written to the logs, thus resulting in heinous corruption
in the logs. decode_utf8() is our friend.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
{ # adapted from http://perldoc.perl.org/5.8.8/functions/readline.html
for ( my $tries = 1 ; $tries <= 3 ; $tries++ ) {
undef $!;
- $record = readline($fh);
+ $record = decode_utf8(readline($fh));
if ( defined($record) ) {
while ( chomp($record) ) { 1; }
$len1 = length($record);