use encoding "utf-8"; # For text containing ISO-8859-1 and/or UTF-8 characters #### open (OUT, ">:encoding(UTF-8)", ">$outfile") || die "Unable to open $outfile for writing."; #### $ENV{NLS_LANG} = 'AMERICAN_AMERICA.AL32UTF8'; # Handle UTF-8 characters #### my $dbh = DBI->connect("dbi:Oracle:$DATABASE", $USERNAME, $PASSWORD, { RaiseError => 1, AutoCommit => 0, ora_charset => "UTF8" }) or die ($DBI::errstr . "\n"); #### $twig = XML::Twig->new( twig_handlers => $handlers, output_encoding => 'utf-8' );