[Rt-commit] rt branch, 4.0/pg-invalid-utf8, created. rt-4.0.6-216-g3a9c38e
? sunnavy
sunnavy at bestpractical.com
Tue Jun 26 11:18:24 EDT 2012
The branch, 4.0/pg-invalid-utf8 has been created
at 3a9c38edf8873465b90ef9efca3c6acb7faf8416 (commit)
- Log -----------------------------------------------------------------
commit 3a9c38edf8873465b90ef9efca3c6acb7faf8416
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jun 26 22:33:40 2012 +0800
text/plain can also contain invalid utf8 data
so don't test mimetype, but check if it's pure ascii instead
see issue #20191
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index b6b403b..ae0c484 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -752,7 +752,7 @@ sub _EncodeLOB {
$MaxSize = $MaxSize * 3 / 4;
# Some databases (postgres) can't handle non-utf8 data
} elsif ( !$RT::Handle->BinarySafeBLOBs
- && $MIMEType !~ /text\/plain/gi
+ && $Body =~ /\P{ASCII}/
&& !Encode::is_utf8( $Body, 1 ) ) {
$ContentEncoding = 'quoted-printable';
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list