rt
rt copied to clipboard
ObjectCustomFieldValues try to guess the LargeContent encoding every time
When accessing the LargeValue
of an ObjectCustomFieldValue
, it's encoding is guessed every time. This is problematic when a ticket has a large number of custom fields and/or when fields have many values (e.g., a ticket with hundreds of IPs in RTIR).
This encoding is automatically set to 'utf-8'
on creation, and may be assumed that it's safe to just decode from utf-8, instead of analyzing its value and guessing the encoding (although that's useful for other contents such as comment bodies).
This patch changes this behavior so the encoding is only guessed when the ObjectCustomFieldValue
content type is not textual (as determined by RT::I18N::IsTextualContentType
)