From 5e9f1e33f182b53cfda94331cd6737cf2021a9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Tue, 27 Mar 2012 20:16:31 +0000 Subject: [PATCH] Do not double decode UTF8 in DBI Notification module (#455) --- .../lib/Lemonldap/NG/Portal/Notification/DBI.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification/DBI.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification/DBI.pm index 4a3986187..24e1b3ad9 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification/DBI.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification/DBI.pm @@ -10,7 +10,7 @@ use Time::Local; use DBI; use utf8; -our $VERSION = '1.1.0'; +our $VERSION = '1.2.0'; ## @method boolean prereq() # Check if DBI parameters are set. @@ -50,10 +50,13 @@ sub get { # Get XML message my $xml = $h->{xml}; - # Decode it twice to get the correct uncoded string - utf8::decode($xml); + # Decode it to get the correct uncoded string utf8::decode($xml); + # TODO on some systems, a second decoding is mandatory + # need to find out why + #utf8::decode($xml); + # Store message in result $result->{"$h->{date}#$h->{uid}#$h->{ref}"} = $xml; }