X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FObjectCustomFieldValue.pm;h=af740e967716f667680704bcbdcf9611b29a0222;hb=5b3efac57771fbc37874a3dd39d3df835cdd6133;hp=0e63ced1b6e8d125eaa8797d7b2520f1138ce4dd;hpb=008524b8e963831999983769f7fec11f55a72f16;p=freeside.git 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"); }