Re: Getting HTMLized Subject in the callbacks

2005-06-22 15:46:34
On June 22, 2005 at 18:04, East Coast Coder wrote:

I wasn't talking about mail encodings.  I was talking about converting
" < > & to html - that is, the subject after mhonarc has converted it
to html.

Encodings are applicable.  See the MIME RFCs.

  DB<2> require './'
  DB<3> $sub = 'Is 5 > "five"?'
  DB<4> print $sub;
Is 5 > "five"?
  DB<5> print readmail::MAILdecode_1522_str($sub)
Is 5 > "five"?

Invalid test.  If you require directly, there are no
charset converters registered.  The mhonarc libraries do this for you,
or you would have to register them yourself.

Something like the following is a more useful:

  # Require MHonArc library
  require '';

  # Initialize MHonArc

  # Just load mhonarc code
  mhonarc::open_archive('-noarg', '-quiet');

  my $sub = 'Is 5 > "five"?';
  print $sub, "\n";
  print readmail::MAILdecode_1522_str($sub), "\n";

When ran, the output is:

  Is 5 > "five"?
  Is 5 &gt; &quot;five&quot;?

If you do not require full character encoding and non-ASCII encoding
support, just use the mhonarc::htmlize() function or write your
own function.


To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the

<Prev in Thread] Current Thread [Next in Thread>