two tweaks to try and prevent utf8 characters getting broken during output csv creation/transfer