Bugzilla – Attachment 34655 Details for
Bug 12739
SendAlerts function does not take care of "html" format or UTF-8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12739 - SendAlerts function does not take care of "html" format or UTF-8 Pt 1
Bug-12739---SendAlerts-function-does-not-take-care.patch (text/plain), 2.53 KB, created by
David Cook
on 2014-12-23 03:17:36 UTC
(
hide
)
Description:
Bug 12739 - SendAlerts function does not take care of "html" format or UTF-8 Pt 1
Filename:
MIME Type:
Creator:
David Cook
Created:
2014-12-23 03:17:36 UTC
Size:
2.53 KB
patch
obsolete
>From 69a7e96b01f404b4e9609c6c17f0cf5fd245f30a Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 23 Dec 2014 13:44:18 +1100 >Subject: [PATCH] Bug 12739 - SendAlerts function does not take care of "html" > format or UTF-8 Pt 1 > >The UTF-8 charset in the content type is written as "utf8" instead of "utf-8" >in SendAlerts(), which causes UTF-8 characters to display incorrectly. > >_TEST PLAN_ > >Before Applying: > >1) Edit ACCTDETAILS >2) Add some UTF-8 characters >I recommend using the following website >http://www.ltg.ed.ac.uk/~richard/unicode-sample.html > >In my tests, I added the samples from Hebrew, Arabic, Basic Latin, >Latin-1 Supplement, Latin Extended-A, and Latin Extended-B. > >3) Set the system preference "AutoEmailOpacUser" to "Send" >4) Create a new user account with your email address > >5) Note that the email in your inbox doesn't display the Unicode >characters correctly > >Apply the patch > >6) Create a new user account with your email address >7) Note that the email in your inbox _does_ display the >Unicode characters correctly. >--- > C4/Letters.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index a11c862..3de1aa3 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -432,7 +432,7 @@ sub SendAlerts { > subject => Encode::encode( "utf8", "" . $letter->{title} ), > message => > Encode::encode( "utf8", "" . $letter->{content} ), >- contenttype => 'text/plain; charset="utf8"', >+ contenttype => 'text/plain; charset="utf-8"', > > } > ); >@@ -519,7 +519,7 @@ sub SendAlerts { > From => $userenv->{emailaddress}, > Subject => Encode::encode( "utf8", "" . $letter->{title} ), > Message => Encode::encode( "utf8", "" . $letter->{content} ), >- 'Content-Type' => 'text/plain; charset="utf8"', >+ 'Content-Type' => 'text/plain; charset="utf-8"', > ); > > $mail{'Reply-to'} = C4::Context->preference('ReplytoDefault') >@@ -568,7 +568,7 @@ sub SendAlerts { > sender => $branchdetails->{'branchreturnpath'}, > subject => Encode::encode( "utf8", "" . $letter->{'title'} ), > message => Encode::encode( "utf8", "" . $letter->{'content'} ), >- contenttype => 'text/plain; charset="utf8"' >+ contenttype => 'text/plain; charset="utf-8"' > } > ); > sendmail(%mail) or carp $Mail::Sendmail::error; >-- >1.8.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12739
:
34655
|
34656
|
34657
|
36174
|
36175
|
37015
|
37016
|
37018