At 10.57 +0000 2000.04.06, Bart Lateur wrote: >I need to convert some RTF files to text. MS Word mangles the >characters, so I need to try another way. > >I downloaded RTF::Parser from CPAN. I converted the rtf2text script into >a droplet, and I found a few platform dependies in the file directory >separator, where "/char_map" is appended to the directory, and changed >them to ":char_map" (quick fix). > >I enabled warnings. When I drop a simple RTF fille on the droplet, I get >a few warnings about "uninitialized values", but that's it. The script >never finishes, and no file is produced. > >I used Chris Nandor's "installme" to install it. No complaints there. I >tried to run the ".t" script, and it says "ok" on all six. Yet, the >script in the example folder complains for every single data line I try >to feed it. (You're supposed to comment all datalines out, except one.). >The error message looks like: > > # unanalized data: ' > ...' at line 13 file > > >Maybe it's a CR vs. LF thing. Line 183: $self->{EOR} = ($$buffer =~ /\cM/ ? q!\r\n! : q!\n!); Should be: $self->{EOR} = ($$buffer =~ /\r/ ? q!\r\n! : q!\n!); The problem is that \cM is \015, so then all of a sudden your EOR is \012\015, which ain't right. I am not sure if this is the best fix, but it is a fix. :) -- Chris Nandor | pudge@pobox.com | http://pudge.net/ Andover.Net | chris.nandor@andover.net | http://slashcode.com/ ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org