Do not double decode UTF8 in DBI Notification module (#455)
This commit is contained in:
parent
d6836adebb
commit
5e9f1e33f1
|
@ -10,7 +10,7 @@ use Time::Local;
|
||||||
use DBI;
|
use DBI;
|
||||||
use utf8;
|
use utf8;
|
||||||
|
|
||||||
our $VERSION = '1.1.0';
|
our $VERSION = '1.2.0';
|
||||||
|
|
||||||
## @method boolean prereq()
|
## @method boolean prereq()
|
||||||
# Check if DBI parameters are set.
|
# Check if DBI parameters are set.
|
||||||
|
@ -50,10 +50,13 @@ sub get {
|
||||||
# Get XML message
|
# Get XML message
|
||||||
my $xml = $h->{xml};
|
my $xml = $h->{xml};
|
||||||
|
|
||||||
# Decode it twice to get the correct uncoded string
|
# Decode it to get the correct uncoded string
|
||||||
utf8::decode($xml);
|
|
||||||
utf8::decode($xml);
|
utf8::decode($xml);
|
||||||
|
|
||||||
|
# TODO on some systems, a second decoding is mandatory
|
||||||
|
# need to find out why
|
||||||
|
#utf8::decode($xml);
|
||||||
|
|
||||||
# Store message in result
|
# Store message in result
|
||||||
$result->{"$h->{date}#$h->{uid}#$h->{ref}"} = $xml;
|
$result->{"$h->{date}#$h->{uid}#$h->{ref}"} = $xml;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user