Huge optimization: work with code points instead of chars.