[Catalyst] Re: UTF-16 surrogate message when writing binary data (image)

Aristotle Pagaltzis pagaltzis at gmx.de
Fri May 9 16:35:47 BST 2008

* Martin Ellison <m.e at acm.org> [2008-05-09 16:05]:
> my $p       = new Image::Magick;
> ... lots of code
> my $pic_image = $p->ImageToBlob();
> I'm not sure if that makes it a character string but surely
> not?

Probably not, hmm.

> I am using the Unicode plugin; does it cause any problems?

It does not cause the problem, exactly, but it will expose
problems in other code if there are. What it does is if the
response body is a character string, it will encode it to
yield a byte string.

But I just realised that you if are getting the warning from
IO::Handle, then the Unicode plugin probably has nothing to do
with it.

Hmm. Maybe enable stack traces (Carp::Always or C:P:StackTrace or
whatever) and then trigger the warning after making all warnings
fatal to force a crash? That way you would find out where in the
Catalyst guts the problem occurs, so you can get an idea of what
a fix might look like.

Aristotle Pagaltzis // <http://plasmasturm.org/>

More information about the Catalyst mailing list