summaryrefslogtreecommitdiff
path: root/rt/lib/RT/ObjectCustomFieldValue.pm
diff options
context:
space:
mode:
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");
}