Fix UnicodeDecodeError in messages_for_exchange().