Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1682

%@LEN[emoji] is 1 but i want it to be 2 — is there something to do this?

$
0
0
How can I accurately measure the width of a string, if %@LEN[] returns 1 for double-wide characters?

I stumbled upon this “bug” when i noticed the code to wrap long lines on my bigecho.bat (echo but in double-height) was wrapping incorrectly.
1733855501588.webp
Notice the dropped "O" in Others.

The more emoji I put into the line, the worse it got:
1733855553700.webp

Eventually I realize, it was undercounting the emoji’s length, because it was counting it as one character, even though, at least...

Read more

Viewing all articles
Browse latest Browse all 1682

Trending Articles