Improve previous fix: don't crash on non-latin1 chars.