Is there an online tool that will tell me the number of bytes in a UTF-8 character? Or, if not, how do I determine this?
I'm currently trying to determine the number of the bytes for the left and right floor characters:
\[LeftFloor]) = U+230A
\[RightFloor]) = U+230B
I looked through this FAQ, but was unable to find an answer.
Thanks for the answers! I tried the various byte counters, and I ran into two issues:
(1) I found that one program, Mego's Byte Counter, gives a different UTF-8 value from the other three for the italicized pi (see first screenshot). Either (as seems more likely) Mego's is incorrect, or the other three all are. Whichever of these is incorrect, they may have other errors as well.
Here are my test glyphs:
glyph 1: 𝜋 (italicized pi)
glyph 2: π (plain-text pi)
For glyph 1 (𝜋), Mego's Byte Counter reports six bytes, while the others say four:
For glyph 2 (π), all report two bytes:
(2) With some glyphs, like those for pi, it's pretty easy to tell when you aren't using the lowest-byte-count version of the glyph (you want the plain-text rather than the italicized version). But what if you're dealing with ones that aren't so obvious, like arrows and other more unusual symbols? Are there cases where you might, say, use an arrow and get x bytes, not realizing there's another version of an arrow that is x-1 bytes? If so, is there a good online listing of minimal-UTF-8-byte-count versions of each type of glyph?
Now you might ask: Why not just copy the glyph from the front end of the program you're using (in my case, Mathematica), since that way you'll be able to determine the byte count of the actual glyph the program uses. The problem is that, when I do that, I don't get the glyph: