Gets the character offset in bytes from the start of a string, with consideration to UTF8 multibyte encoding.