Humm, sounds you're trying to serve binary content and it goes through the html display.
Here's the recipe to serve dynamic binary content with mason: 1. %# file.html 2. <%init> 3. use Apache2::Const qw(OK); 4. my $content = ... ; # Your magically generated binary content 5. my $mimeType = 'application/pdf' ; # for instance. 6. my $fileName = 'example.pdf' ; 7. $m->clear_buffer; 8. $r->content_type($mimeType) ; 9. $r->headers_out->add('Content-Disposition' => "attachment; filename=$fileName"); # # Optional . dont do that if you serve your content inline. This triggers the download dialog window # 11. binmode STDOUT ; # Go in pure binary mode for output 12. print STDOUT $content; # output your content 13. $m->abort(OK); # that's enough ! 14. </%init> In your case, your mimeType would be something like 'image/png' and your $content, well your png binary data.. With this example, your image code would be : <img src="file.html" /> which can lead to some misunderstanding for peeky users who look at the source code of your pages. To solve that, you have to let apache go through mason to serve let's say your /dynimg/ressource.png files: <LocationMatch "/dynimg/*.png"> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </LocationMatch> Cheers ! J On Mon, Nov 10, 2008 at 12:09 AM, Ryan <[EMAIL PROTECTED]> wrote: > I am running into an "Unrecognized character \x8F" error when trying to > create a dynamic image. I have a PNG: > <89>PNG > ^Z > [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]&[EMAIL > PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@<92><C5>c<D9>[EMAIL > PROTECTED]@[EMAIL PROTECTED]@^@<AF><C8>7^E<8A><E9>[EMAIL > PROTECTED]@^A<8C>iCCPICC > [EMAIL PROTECTED]@x<9C><95><91><BF>KESCa^X<C7>?<EF>^E > m5K<AF><B5>^H<85>ESCJ<CC><90><96><A0>K<84>"$^Yb<89><C3>5^D<F2>c<BB><DC>]<93><C0><F5><F2>r<F7>6m > <FF><80><EE><81>n<E2>`^U<9C>D<9C><C4>1^?<80>[<A1>8<88> > <F4>^O(^D\D<CE><E1>m<C9><A2>H<BF><F0><C0><E7><F9><F2><C0><F3>^K<8C><89>[EMAIL > PROTECTED]<D5><AB>e<AB><D5><EE>X<E9>3<9E><F0>[EMAIL > PROTECTED]<96>%<DB><DE><E4>^]<FD>B^@<FC>|<ED>H^Y<DC>_w<A7><E6><A3>V<BB>^C<C2>^D...................... > <%attr> > something => 1 > </%attr> > <%perl> > doSomething(); > </%perl> > Any ideas on how this can work? > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Mason-users mailing list > Mason-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mason-users > > -- Jerome Eteve. Chat with me live at http://www.eteve.net [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users