Add UTF8 support

UTF8 characters are now supported by correctly calculating the length
and offsets within strings. Unit tests are also updated to include
multi-byte characters.