baedert / corebird

Native Gtk+ Twitter Client
https://corebird.baedert.org
GNU General Public License v3.0
791 stars 78 forks source link

Corebird doesn't count "280" characters properly #794

Open IBBoard opened 6 years ago

IBBoard commented 6 years ago

Ticket #780 added 280 characters, but it takes the simplest approach and doesn't count correctly by Twitter's rules.

For example, the following is 200 smilies:

😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊

Corebird says I have 80 characters left, whereas Twitter says I'm 120 characters over the limit.

People like FakeUnicode have been poking what counts for one character and what counts for two, but it's not authoritative.

The Twitter-Text API has a section on "weighted length calculation" and what the ranges are.

Corebird should incorporate those ranges and make "correct" counts.