[Rt-commit] r16932 - rt/3.8/trunk/sbin
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Nov 19 13:51:45 EST 2008
Author: sunnavy
Date: Wed Nov 19 13:51:45 2008
New Revision: 16932
Modified:
rt/3.8/trunk/sbin/rt-email-dashboards.in
Log:
fix non-text string to be treated as utf8
Modified: rt/3.8/trunk/sbin/rt-email-dashboards.in
==============================================================================
--- rt/3.8/trunk/sbin/rt-email-dashboards.in (original)
+++ rt/3.8/trunk/sbin/rt-email-dashboards.in Wed Nov 19 13:51:45 2008
@@ -293,6 +293,12 @@
$cid_of{$uri} = time() . $$ . int(rand(1e6));
my ($data, $filename, $mimetype, $encoding) = get_resource($uri);
+ # downgrade non-text strings, because all strings are utf8 by
+ # default, which is wrong for non-text strings.
+ if ( $mimetype !~ m{text/} ) {
+ utf8::downgrade( $data, 1 ) or warning "downgrade $data failed";
+ }
+
push @parts, MIME::Entity->build(
Top => 0,
Data => $data,
More information about the Rt-commit
mailing list