use Encode; my $bytes = encode('utf8', $input); email( { ... charset => 'utf8', _text => $bytes, }) ...