handle encoding in test runner