[Rt-commit] rt branch, 3.8-trunk,	updated. a8017097063e83b31de39f580aaa1846ea4e6336
    Ruslan Zakirov 
    ruz at bestpractical.com
       
    Mon Jul 27 10:01:50 EDT 2009
    
    
  
The branch, 3.8-trunk has been updated
       via  a8017097063e83b31de39f580aaa1846ea4e6336 (commit)
      from  a4e5bc195b30a49d9125e948f008566899b70f9b (commit)
Summary of changes:
 lib/RT/ObjectCustomFieldValue_Overlay.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit a8017097063e83b31de39f580aaa1846ea4e6336
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date:   Mon Jul 27 17:59:34 2009 +0400
    use byte length when choose between Content and LargeContent
    
    DBIx::SB truncate data using bytes (even if DB supports characters),
    so 255 is length in bytes and we have to use the same algorithm in RT.
diff --git a/lib/RT/ObjectCustomFieldValue_Overlay.pm b/lib/RT/ObjectCustomFieldValue_Overlay.pm
index dd0bbe4..6075f4f 100644
--- a/lib/RT/ObjectCustomFieldValue_Overlay.pm
+++ b/lib/RT/ObjectCustomFieldValue_Overlay.pm
@@ -68,9 +68,9 @@ sub Create {
         @_,
     );
 
-    if ( defined $args{'Content'} && length( $args{'Content'} ) > 255 ) {
+    if ( defined $args{'Content'} && length( Encode::encode_utf8($args{'Content'}) ) > 255 ) {
         if ( defined $args{'LargeContent'} && length $args{'LargeContent'} ) {
-            $RT::Logger->error("Content is longer than 255 and LargeContent specified");
+            $RT::Logger->error("Content is longer than 255 bytes and LargeContent specified");
         }
         else {
             $args{'LargeContent'} = $args{'Content'};
-----------------------------------------------------------------------
    
    
More information about the Rt-commit
mailing list