Fix encoding in tests.