[Rt-commit] r17906 - in rt/3.999/branches/merge_to_3.8.2: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Jan 25 21:37:07 EST 2009
Author: sunnavy
Date: Sun Jan 25 21:37:06 2009
New Revision: 17906
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Attachment.pm
Log:
r19008 at sunnavys-mb: sunnavy | 2009-01-26 10:06:16 +0800
merged lib/RT/Model/Attachment.pm
Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Attachment.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Attachment.pm (original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Attachment.pm Sun Jan 25 21:37:06 2009
@@ -144,6 +144,12 @@
#Get the filename
my $filename = $Attachment->head->recommended_filename;
+ # MIME::Head doesn't support perl strings well and can return
+ # octets which later will be double encoded in low-level code
+ my $head = $Attachment->head->as_string;
+ utf8::decode($head);
+
+
# If a message has no bodyhandle, that means that it has subparts (or appears to)
# and we should act accordingly.
@@ -152,7 +158,7 @@
transaction_id => $args{'transaction_id'},
parent => $args{'parent'},
content_type => $Attachment->mime_type,
- headers => $Attachment->head->as_string,
+ headers => $head,
message_id => $message_id,
subject => $subject,
);
@@ -185,7 +191,7 @@
content_type => $Attachment->mime_type,
content_encoding => $content_encoding,
parent => $args{'parent'},
- headers => $Attachment->head->as_string,
+ headers => $head,
subject => $subject,
content => $Body,
filename => $filename,
More information about the Rt-commit
mailing list