How do I find the number of bytes for a character?

Alternatively, and more directly, you can use ncodeunits:

julia> ncodeunits('a')
1

julia> ncodeunits('α')
2
8 Likes