Avoid truncated UTF-8 strings when using substr()
CRM_Core_BAO_Mapping::getCustomGroupName() truncates custom group names when longer than 10 characters using
substr(), which causes multibyte characters being cut in half when at the truncating position.
This should use
CRM_Utils_String::ellipsify() instead, which utilises
Maybe someone with more core code insight should inspect a
grep substr( result for more places where that happens.
Steps to reproduce:
- Create a custom field group with a name with a multibyte character at the 10th position, e.g. German umlaut
- Add any custom field
- Do a contact search, select some contacts, choose "export" action
- Choose "Select fields to export"