RTF::Encode - Escapes strings into RTF
use RTF::Encode qw/ encode_rtf /;
print encode_rtf("Smiling cat with heart shaped eyes, ".chr(0x1f63b);
my $rtf = encode_rtf($unicode);
This function takes a string, which may contain Unicode characters, and returns a string escaped to be used in an RTF file. It can be used to safely insert arbitrary text into a template RTF file, perhaps via Template.
\uN escaping is always used, even for characters less than 255, because the alternative, \'hh needs to know the current code page.
Line breaks are encoded as line breaks, \line, not as paragraphs.
\ucN is not generated, it does not appear to be necessary.
Dave Lambley <firstname.lastname@example.org>
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install RTF::Encode, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.