Aha, io was not set to unicode output when not in interactive mode..