Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: pod2rtf

by casiano (Pilgrim)
on Apr 18, 2009 at 08:21 UTC ( #758422=note: print w/replies, xml ) Need Help??


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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://758422]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2018-02-20 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (271 votes). Check out past polls.

    Notices?