Bug 16127 - broken UTF-8 handling while trimming field length

Summary: broken UTF-8 handling while trimming field length