Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fix zwj counting #114

Closed
Closed

Description

@IBBoard

When using ZWJ characters (like 🏳️‍🌈, which is made of 🏳️ + ZWJ + 🌈) Cawbird "miscounts" compared to Twitter. This causes tweets to become unpostable when they're actually valid.

Character Twitter Cawbird Notes
🏳️ 2 2/4 Appears to be 4 because of VS-16 for "E0.7 white flag" but not in "white flag"
🌈 2 2
🏳️‍🌈 2 5/7 2/4 (flag) + 1 (ZWJ) + 2 (Rainbow)
👨🏾 2 4 2 (face) + 2 (Fitzpatrick modifier)
👨 2 2

This actually needs to be included in libtweetlength, but we bundle a copy of the library.

Activity

  1. IBBoard commented on Aug 29, 2020

    @IBBoard
    OwnerAuthor

    This appears to be related to twitter/twitter-text#265 and the v3 parsing, which treats recognised emoji differently.

  2. IBBoard commented on Aug 29, 2020

    @IBBoard
    OwnerAuthor

    For future testing, use the following tweet text and then paste each emoji:

    This is some very long text that makes Twitter show remaining character count instead of just the blue circle. This is some very long text that makes Twitter show remaining character count instead of just the blue circle. This is some very long text that makes…

    The text should show 17 characters remaining at first (18 if it doesn't copy the trailing space that I put in), so you can see how many characters remain afterwards.

  3. IBBoard commented on Mar 14, 2021

    @IBBoard
    OwnerAuthor

    The special case solution for this would be easy. But the handling of things like families and other ZWJ sequences is MUCH harder!

  4. added a commit that references this issue on Mar 20, 2021
  5. added a commit that references this issue on Apr 6, 2021
    f4d1461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions