rtf2html.pl

I recently needed to convert some RTF stored in a database to html (xhtml)… or least into xhtml fragments that could be wrapped inside a tag. I only needed to support bold, italic, underline, and paragraphs; fonts, page layout, etc. could just get chucked. The result is rtf2html.pl. Be sure to read the disclaimer at the top.

It’s a quick-and-dirty hack. It’s probably too verbose, and misses common Perl idioms. On the plus side, it works (always a plus). If you’re an experience perl guru and see anywhere I should have used a standard perl idiom, please drop a comment. I’m not looking for obfuscation-contest entries, just things I’m doing the hard (or verbose) way.

Both comments and pings are currently closed.

Comments are closed.