summaryrefslogtreecommitdiff
path: root/rt/lib/RT/ObjectCustomFieldValue.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-09-15 20:44:48 -0700
committerIvan Kohler <ivan@freeside.biz>2014-09-15 20:59:00 -0700
commit5b3efac57771fbc37874a3dd39d3df835cdd6133 (patch)
treef653976031646a27771f39902ed9296a4c129f30 /rt/lib/RT/ObjectCustomFieldValue.pm
parent008524b8e963831999983769f7fec11f55a72f16 (diff)
RT 4.0.22
Diffstat (limited to 'rt/lib/RT/ObjectCustomFieldValue.pm')
-rw-r--r--rt/lib/RT/ObjectCustomFieldValue.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/rt/lib/RT/ObjectCustomFieldValue.pm b/rt/lib/RT/ObjectCustomFieldValue.pm
index 0e63ced1b..af740e967 100644
--- a/rt/lib/RT/ObjectCustomFieldValue.pm
+++ b/rt/lib/RT/ObjectCustomFieldValue.pm
@@ -90,7 +90,8 @@ sub Create {
my ($val, $msg) = $cf->_CanonicalizeValue(\%args);
return ($val, $msg) unless $val;
- if ( defined $args{'Content'} && length( Encode::encode_utf8($args{'Content'}) ) > 255 ) {
+ my $encoded = Encode::encode("UTF-8", $args{'Content'});
+ if ( defined $args{'Content'} && length( $encoded ) > 255 ) {
if ( defined $args{'LargeContent'} && length $args{'LargeContent'} ) {
$RT::Logger->error("Content is longer than 255 bytes and LargeContent specified");
}