From ed1f84b4e8f626245995ecda5afcf83092c153b2 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 15 Sep 2014 20:44:48 -0700 Subject: RT 4.0.22 --- rt/lib/RT/ObjectCustomFieldValue.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rt/lib/RT/ObjectCustomFieldValue.pm') 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"); } -- cgit v1.2.1