Fix #758: UTF-8 special characters in exception messages get garbled in exception output