JFreegman / toxic

A Tox-based instant messaging and video chat client
GNU General Public License v3.0
1.19k stars 152 forks source link

Nicknames are cutted strangely in groupchats #436

Closed Renha closed 7 months ago

Renha commented 7 years ago

In the userlist of groupchat, nickname

[☯]S☠ǚll[☣]

looks like

[☯]S☠ǚll[

while

Ihatenicknames

perfectly fits, so that's not lenght-related issue.

GrayHatter commented 7 years ago

Utf8 strings are hard huh?

JFreegman commented 7 years ago

The reason this happens is because some Unicode characters are more than one byte, e.g. strlen("☯") might be equal to 2 or 3. Nicks are truncated based on the length that toxcore supplies, and toxic doesn't take into account the varying unicode character sizes. It's fixable, but very complicated/low priority.

JFreegman commented 7 months ago

Closing due to inactivity