Support multi-byte character matches

Previously the byte position was expected to always be the same
as the character position which would cause incorrect match indices
for strings that were searched that contained characters that were
multi-byte.