
didi at isoc
Jul 9, 2009, 10:02 AM
Post #1 of 1
(433 views)
Permalink
|
|
problem with UTF-8 CustomFields
|
|
Hi all, We use Debian Lenny's requesttracker-3.6 (RT 3.6.7). When we try to create a custom field value with some Hebrew chars, we get this in "Results": * field1 SOMETHING changed to SOMETHINGELSE * SOMETHINGELSE is no longer a value for custom field field1 and the field is empty. It happens in RTFM, but I do not think it's relevant only to it. I tried to debug this, and eventually found: ObjectCustomFieldValue_Overlay.pm, sub Create, line 56: if( $args{'Content'} && length($args{'Content'}) > 255 && !$args{'LargeContent'} ) { I understand from this that there is special treatment of long (>255) fields, but the test is on length($args{'Content'}), which is in chars, while the restriction is (probably?) for the storage, which is in bytes. Having seen that, I tried saving values of various lengths, and indeed, if I save things a bit longer, it works (as they are converted to LargeContent). I tried (for a test) to change the code above to "> 127", to make it convert also shorter values, and it did not work - it had some other wrong behaviour. I guess there is some other code that deals with "> 255" and that all of it should be converted to check for bytes and not chars. I am not fluent enough in perl/RT to do this myself currently. I looked at the code, and it seems to be the same in RT 3.8.4. Best regards, -- Yedidyah Bar David System Administrator, ISOC-IL _______________________________________________ List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
|