http://www.perlmonks.org?node_id=758422


in reply to pod2rtf

Thanks for the script.

I have experienced problems when converting files containing utf8 characters (like spanish accents, etc.). The alternative was to convert the file first to isolatin:

#!/usr/bin/perl -w use strict; use Pod::Simple::RTF; my $file = shift || die "Provide a file name\n"; die "Provide a file name\n" unless -r $file; my $latin = $file; $latin = "$file.latin"; my $parser = Pod::Simple::RTF->new(); my $outfile = $file; $outfile =~ s/\.\w*$/.rtf/ or $outfile = "$file.rtf"; open STDOUT, "> $outfile"; system("iconv -f UTF-8 -t ISO_8859-15 $file > $latin") and die "Can't +execute iconv\n"; Pod::Simple::RTF->filter($latin)->any_errata_seen; unlink $latin;