Just in case you need it, I implemented fastest found JS helper that counts UTF-8 codepoints in Buffer. https://gist.github.com/RReverser/f5cb2152d2655b9e9d09 … cc @mathias
@RReverser I’m confused — what does this actually do? If the goal is to count UTF-8 bytes, this seems broken.
-
-
@mathias What is "UTF-8 bytes"? This counts codepoints (assuming that our buffer contains complete ones) -
@RReverser There is no such thing as “UTF-8 code points” btw. It’s either Unicode code points, or their UTF-8 encoded byte sequences. - 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.