Closed code-chicken closed 2 years ago
Hey,
First off, thanks so much for the contribution.
Currently, github for FreePBX is a read only mirror of the code at git.freepbx.org. All code reviews are funneled through that repo, and so you'll need to resubmit there instead for this to move forward.
Best wishes, Matthew Fredrickson
stripAccents() treats UTF8-strings like ASCII-strings and changes special characters to something like 7-Bit-characters without accents. If there are still phones out there which are not able to display at least ISO-8859-1 characters like á, ä, â, ... they should be replaced by newer ones. However, after stipAccents() was called in line 194, the content of the unicode string was destroyed anyway and so the original line 205 didn't make sense any more. Also I don't see any reason why one should cut off a callers name after 60 characters. This should be done by the phone itself if it doesn't have the capability to display longer names. Finally if the name is already encoded in UTF8 (like results from databases or Google Contacts) it shouldn't be converted a second time. After these changes Google Contact information was eventually correctly displayed on different phones even with umlauts or special characters. I tested this with Snom, Yealink and Zoiper.