In fact, since you are only trying to find the length, maybe unicode would work for all cases?