[Catalyst] UTF-16 surrogate warning under FastCGI

Jim Spath jspath at pangeamedia.com
Tue Jul 22 22:25:06 BST 2008


Jim Spath wrote:
> So I know the whole UTF-16 surrogate warning issue has been brought up a 
> few times on this list, but I don't think anyone has posted a reliable 
> test case, so I thought I would take a stab at it.  We have over 2700 of 
> these warnings in todays error logs, so it'd be nice to get rid of them.
> 
> All that's really necessary is to reproduce the problem is to output a 
> body of the necessary length:
> 
>   # 56338 = 0xdc12
>   $c->response->body(1 x 56338);
> 
> And to run your application under FastCGI.  It will produce the 
> following warning every time:
> 
> UTF-16 surrogate 0xdc12 at /usr/lib/perl/5.8/IO/Handle.pm line 199.
> 
> I've created a minimal Catalyst application to demonstrate the problem 
> which can be downloaded here:
> 
> http://www.filedropper.com/utf16tar
> 
> No plugins are used and binmode is not set.
> 
> Anyways, hopefully this makes it easier for people to figure out what is 
> going on.
> 
> - Jim

The tar.gz file for my demonstration application appears to be messed 
up, sorry about that.  Here's a zip file that is valid:

http://www.filedropper.com/utf16

- Jim



More information about the Catalyst mailing list