[bug][feature] Preserve nonbreaking spaces when preserve encoding is true. Allow encoding type to be set for
multibyte conversion when generating output.