Trying to fix my badly merge from @cswiii.

Tests with UTF-8 and Latin characters don't always pass but at least the tests are now properly fixed.