Alternatively, and more directly, you can use ncodeunits:
ncodeunits
julia> ncodeunits('a') 1 julia> ncodeunits('α') 2