<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">hey roman and all,<div><br></div><div><br><div><div>On 21 Jul 2014, at 14:36, Roman Winfinit &lt;<a href="mailto:winfinit@gmail.com">winfinit@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p dir="ltr">Hello,</p><p dir="ltr">How are you running your application? Ie: mod_perl, fcgi, fcgi + httpd/nginx, plack + …</p></blockquote><div>apache2 + fastcgi</div><blockquote type="cite"><p dir="ltr"> also what version of perl are you using and what os ?</p><div><br></div></blockquote>debian wheezy,</div><div>perl 5.20.0&nbsp;</div><div>(but the errors also occure on another system with an older perl version 5.12.something)<br><br>need more infos ?</div><div>bye, berni<br><br><blockquote type="cite"><p dir="ltr">-roman</p>
<div class="gmail_quote">On Jul 21, 2014 6:58 AM, "Bernhard Bauch" &lt;<a href="mailto:bauch@zsi.at">bauch@zsi.at</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hey all,<div><br></div><div>on most of my website running on (latest catalyst: 5.90065) i always get utf8 related errors.</div><div>the usually appear if a spider&nbsp;</div><div><span style="white-space:pre-wrap">        </span>Mozilla/5.0 (compatible; EasouSpider; +<a href="http://www.easou.com/search/spider.html" target="_blank">http://www.easou.com/search/spider.html</a>)</div>
<div>comes accross.</div><div><br></div><div>the error is:</div><div><span style="white-space:pre-wrap">        </span>Caught exception in engine "UTF8 Error: utf8 "\x98" does not map to Unicode at /usr/local/…./lib/perl5/Catalyst/Plugin/Unicode/Encoding.pm line 167.</div>
<div><br></div><div>It took me while to get the actual parameters the spiders sends because the debug-message of catalyst do not tell that much :...</div><div><br></div><div>—————————————</div><div>[2014/07/16 15:08:47] [5.255.253.218] [INFO] vim /usr/local/…./lib/perl5/Catalyst.pm +2016: *** Request 164 (0.032/s) [10682] [Wed Jul 16 15:08:47 2014]&nbsp;***<br>
[2014/07/16 15:08:47] [5.255.253.218] [DEBUG] vim /usr/local/…./lib/perl5/Catalyst.pm +2309: Response Code: 400; Content-Type: text/plain; charset=UTF-8; Content-Length: unknown<br>[2014/07/16 15:08:47] [5.255.253.218] [INFO] vim /usr/local/.../lib/perl5/Catalyst.pm +1880: Request took 0.006491s (154.059/s)<br>
.---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------.<br>| Action &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| Time &nbsp; &nbsp; &nbsp;|<br>
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+<br>'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------'</div>
<div>—————————————</div><div><br></div><div>i changed to Plugin::Unicode::Encoding plugin a bit to find out what the client sends … the results are these:</div><div>UTF8 trash arrives - and the module seems unable to deal with it…</div>
<div><br></div><div>————————————</div><div>Caught exception in engine "UTF8 Error: utf8 "\x98" does not map to Unicode at /usr/local/…../lib/perl5/Catalyst/Plugin/Unicode/Encoding.pm line 170.<br>&nbsp;-<br><br>
URL: notice/list<br><br>PARAMS:$VAR1 = {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'X*Ö^K^@^@^@^@¸®ä<br>^@^@^@^@8&lt;83&gt;^H^K^@^@^@^@h¡ä<br>^@^@^@^@Hµä<br>^@^@^@^@X^Z^N^Q^@^@^@^@ø&lt;91&gt;^F^Q^@^@^@^@Ø^F^N^Q^@^@^@^@¸&lt;92&gt;^F^Q^@^@^@^@(^K^N^Q^@^@^@^@&lt;88&gt;^B^N^Q^@^@^@^@¸úÝ^P^@^@^@^@^X%q^G^@^@^@^@اñ^O^@^@^@^@ØøB.^@^@^@^@èâÝ^P^@^@^@^@XÛ_^L^@^@^@^@ÈíÝ^P^@^@^@^@¸~P^S^@^@^@^@èåÝ^P^@^@^@^@Øný^O^@^@^@^@&lt;88&gt;úÝ^P^@^@^@^@^Xá( ^@^@^@^@ئÆ<br>
^@^@^@^@Øï*^Q^@^@^@^@^X' =&gt;&nbsp;'^F^L^@^@^@^@&lt;98&gt;Ûø^O^@^@^@^@Ø~^A^N^@^@^@^@&lt;98&gt;=H&gt;^@^@^@^@ø&lt;99&gt;ó^K^@^@^@^@hÔu^R^@^@^@^@¸&lt;8e&gt;ó^K^@^@^@^@^Xä_^L^@^@^@^@Ø&lt;90&gt;a^G^@^@^@^@hðÉ^O^@^@^@^@8ã*^G^@^@^@^@ØØý^M^@^@^@^@Xùë^F^@^@^@^@^HÜý^M^@^@^@^@8W6^H^@^@^@^@øÐý^M^@^@^@^@xÿÃ^K^@^@^@^@X]i^O^@^@^@^@8^Mÿ^H^@^@^@^@Xû&lt;98&gt;^Q^@^@^@^@x¦h^H^@^@^@^@Xý&lt;98&gt;^Q^@^@^@^@^X=5^H^@^@^@^@^X¦ú^K^@^@^@^@^XVQ^P^@^@^@^@^H^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gt;ô^P^@^@^@^@&lt;90&gt;&lt;81&gt;ô^P^@^@^@^@&nbsp;&lt;97&gt;ô^P^@^@^@^@Ð&lt;8c&gt;ô^P^@^@^@^@p&lt;88&gt;ô^P^@^@^@^@P&lt;99&gt;ô^P^@^@^@^@&lt;90&gt;&lt;90&gt;ô^P^@^@^@^@@&lt;9a&gt;ô^P^@^@^@^@0&lt;9b&gt;ô^P^@^@^@';<br>
<br><br>headers: Connection: close<br>Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1<br>Accept-Encoding: gzip, deflate<br>Accept-Language: zh;q=0.9,en;q=0.8<br>
Host: <a href="http://wbc-inco.net/" target="_blank">wbc-inco.net</a><br>User-Agent: Mozilla/5.0 (compatible; EasouSpider; +<a href="http://www.easou.com/search/spider.html" target="_blank">http://www.easou.com/search/spider.html</a>)<br>
Content-Length: 927<br>Content-Type: application/x-www-form-urlencoded<br>REFER: <a href="http://b------.net/%E2%80%9C" target="_blank">http://b------.net/“</a></div><div><br></div><div>————————————<br><br></div><div>to understand the logging above: this is what i added /changed in the&nbsp;Catalyst::Plugin::Unicode::Encoding</div>
<div><br></div><div>————————————————————</div><div>around line 168:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; my $val;<br>&nbsp; &nbsp; &nbsp; &nbsp; eval {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$val = &nbsp;Encode::is_utf8( $value ) ? $value : $enc-&gt;decode( $value, $CHECK );<br>
&nbsp; &nbsp; &nbsp; &nbsp; };<br>&nbsp; &nbsp; &nbsp; &nbsp; if ($@){<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # UPS !<br>&nbsp; &nbsp; &nbsp; &nbsp; # get request infos<br>use Data::Dumper;<br>my $params = $self-&gt;req-&gt;parameters;<br>my $headers= $self-&gt;req-&gt;headers-&gt;as_string;<br>die "UTF8 Error: $@ - \n\nURL: " . $self-&gt;req-&gt;path . "\n\nPARAMS:" . Dumper( $params ) . "\n\n // value: " . Dumper($value) . "\n\nheaders: " . $headers;<br>
….</div><div>————————————————————</div><div><br></div><div>I guess my Catalyst Apps are not the only ones with these errors ?</div><div><br></div><div><br></div><div>about my App settings / config:</div><div><br></div><div>
app-config has</div><div><span style="white-space:pre-wrap">        </span>encoding &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UTF-8</div><div><br></div><div>App.pm does not load Unicode::Encoding anymore (since this is not need when using latest Catalyst: 5.90065)</div>
<div><br></div><div>i am using postgres with</div><div><span style="white-space:pre-wrap">        </span>pg_enable_utf8&nbsp;1</div><div>(but the error about is far away from any DB related problem i guess)</div><div><br></div><div>using&nbsp;Catalyst::Plugin::Unicode::Encoding version 2.1 (coming with catalyxt)</div>
<div><br></div><div>i just checked out the tracker for catalyst on cpan, there is an UTF8 issue ticket</div><div><span style="white-space:pre-wrap">        </span><a href="https://rt.cpan.org/Public/Bug/Display.html?id=94957" target="_blank">https://rt.cpan.org/Public/Bug/Display.html?id=94957</a></div>
<div>but i does not look as it was this problem ...</div><div><br></div><div>Any ideas what todo ?</div><div>Add a issue/ticket ?</div><div><br></div><div>thanks for feedback,</div><div>bernhard bauch<span style="white-space:pre-wrap">        </span></div>
<div><br></div><div><br></div><div><br><div>
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;"><div>—</div><div>Bernhard Bauch, Webdevelopment<br>ZSI - Zentrum für soziale Innovation<br>
<a href="mailto:bauch@zsi.at" target="_blank">bauch@zsi.at</a><br>Skype: berni-zsi</div></div>
</div>
<br></div></div><br>_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div>


!DSPAM:53cd09a3104511692032419!
_______________________________________________<br>List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a><br><br><br>!DSPAM:53cd09a3104511692032419!<br></blockquote></div><br><div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>—</div><div>Bernhard Bauch, Webdevelopment<br>ZSI - Zentrum für soziale Innovation<br><a href="mailto:bauch@zsi.at">bauch@zsi.at</a><br>Skype: berni-zsi</div></div>
</div>
<br></div></body></html>