Fix issue where truncation or infinite loop might occur.

Text is truncated when calling Encoding::fixUTF8 if mb_strlen is overloading strlen. This is because mb_strlen returns the char length instead of the byte length of the string.
Merge branch 'fix-truncation-and-infinite-loops' of https://github.com/jpirkey/forceutf8 into jpirkey-fix-truncation-and-infinite-loops