bitpiston / oyster

A Perl web application framework.
Other
3 stars 1 forks source link

Use of wide characters in FCGI::Stream::PRINT is deprecated #63

Closed einkoro closed 11 years ago

einkoro commented 11 years ago
[root@xsgames01-dev ~]# tail /var/log/lighttpd/error.log
2012-10-31 17:45:08 (trace) (mod_proxy_backend_fastcgi.c:650) (stderr from 
unix:/var/run/chowder/cinemobile.sock for /home/5381/chowder/shared/oyster.fcgi) 
Use of wide characters in FCGI::Stream::PRINT is deprecated and will stop wprking in a future 
version of FCGI at ./modules/ssxslt.pm line 119.
einkoro commented 11 years ago

Seems like file::slurp is the source:

(ssxslt line 119) print $styles{$style_id}->output_string($style); --> (xml::parser line 29) $self->parse_string(file::slurp($file)); --> (file line 153) open(my $fh, $file) ...

The best option here I think is to add an optional encoding like: string file_contents = file::slurp(string filename[, string encoding])

http://ahinea.com/en/tech/perl-unicode-struggle.html http://stackoverflow.com/questions/6162484/why-does-modern-perl-avoid-utf-8-by-default

einkoro commented 11 years ago

I'm fairly sure commit d4c59ea0e9e02ade72e423ed34c7654579d987f8 fixed this. At the very least I haven't seen it in logs since then.