Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discrepancy in unicode character lengths in quill #3138

Closed
khaled4vokalz opened this issue Aug 18, 2020 · 3 comments
Closed

discrepancy in unicode character lengths in quill #3138

khaled4vokalz opened this issue Aug 18, 2020 · 3 comments

Comments

@khaled4vokalz
Copy link

khaled4vokalz commented Aug 18, 2020

discrepancy in unicode character lengths in quill

Steps for Reproduction

  1. check https://codepen.io/khaled4vokalz/pen/YzqWjgv?editors=0011
  2. even though "ő".length === 2 quill considers it as length 1 when we do quill.getLength() but for an emoji e.g. "😀".length === 2 quill considers it as length of 2 when we do quill.getLength()
  3. even though quill.getLength() returns 1 for , if I try to create a delta with and check delta.length() that returns 2. This is quite confusing.

Expected behavior:

  • as JS returns same length for both the characters quill should do the same

Actual behavior:

  • quill.getLength() returns 2 for and quill.getLength() returns 3 for 😀. quill should have a consistent behavior regarding the length that it calculates

Platforms:

Chromium: 81.0.4044.138, Ubuntu 20.04

Version:

1.3.6

@khaled4vokalz
Copy link
Author

@jhchen can you please review this issue early?

@benbro
Copy link
Contributor

benbro commented Feb 3, 2024

Related #1230

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants