b=403185
- don't croak on malformed utf-8, just log it so we can fix it git-svn-id: svn://10.0.0.236/trunk@239064 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -226,6 +226,13 @@ sub AUTOLOAD {
|
||||
return $self->$col(@args);
|
||||
}
|
||||
|
||||
sub _log {
|
||||
my ($self, $message, %info) = @_;
|
||||
binmode(STDERR,':utf8');
|
||||
print STDERR "$message";
|
||||
return;
|
||||
}
|
||||
|
||||
# DBI error handler for SQL errors:
|
||||
sub _croak {
|
||||
my ($self, $message, %info) = @_;
|
||||
@@ -315,7 +322,7 @@ sub utf8_columns {
|
||||
# the process. Turn the bit off again.
|
||||
Encode::_utf8_off($self->{$_});
|
||||
# ..and die
|
||||
$self->_croak("Invalid UTF8 from database in column '$_'");
|
||||
$self->_log("Invalid UTF8 from database in column '$_': " . $self->{$_});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user