Fix tests on non UTF-8 systems