Bug 10605: fix encoding issue on basket email (INTRANET)
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 14 Nov 2013 10:31:23 +0000 (11:31 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 10 Dec 2013 04:37:12 +0000 (04:37 +0000)
Same fix for the staff interface.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Both patches tested with English and German, diacritics
now appear correctly if UTF-8 is selected as encoding.
Passes all tests and QA script.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

basket/sendbasket.pl

index 3f57de2..885ee41 100755 (executable)
@@ -131,8 +131,9 @@ if ( $email_add ) {
     }
 
     if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
-        $body = encode_qp($1);
+        $body = $1;
         $body =~ s|\n?(.*)\n?|$1|;
+        $body = encode("UTF-8", encode_qp($body));
     }
 
     my $boundary = "====" . time() . "====";