question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Properly measure unicode beyond ascii

See original GitHub issue

SimpleTextLayout naively assumes char count is width

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JakeWhartoncommented, Sep 16, 2020

The library now handles ANSI escape sequences (which measure to zero) and multi-char codepoints (which measure to one). Going to close for want of specific issues which are not dealing with monospace fonts and their lack of support for emoji and non-western script.

0reactions
yschimkecommented, Aug 13, 2020

Yep, I went in there to fix it and can see you are already handling it correctly, but it’s just the additional width of the those unicode characters.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the difference between ASCII and Unicode?
Unicode is a superset of ASCII, and the numbers 0–127 have the same meaning in ASCII as they have in Unicode. For example,...
Read more >
How to determine string is ASCII or Unicode? - NI Community
Solved: As title, I'm trying to detect input string is ASCII or Unicode. I cannot figure it out. Pls kindly help if anyone....
Read more >
Unicode, UTF8 & Character Sets: The Ultimate Guide
This article relies heavily on numbers and aims to provide an understanding of character sets, Unicode, UTF-8 and the various problems that ...
Read more >
How to solve unicode encoding issues - Invivoo
In ths new article, our expert will explain you how to solve unicode encoding issues. If you have any question, don't hesite to...
Read more >
FAQ - UTF-8, UTF-16, UTF-32 & BOM - Unicode
UTF-8 uses the bytes in the ASCII only for ASCII characters. Therefore, it works well in any environment where ASCII characters have a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found