This issue is mostly why I sent it to the list instead of as a bug report.<br><br>I couldn&#39;t figure out how to shove it into Catalyst::Plugin::Unicode and putting it directly in Chained.pm isn&#39;t the right place in itself.<br>
<br>I like the idea of specifying an encoding in the config file and making Catalyst::Plugin::Unicode disappear but that is probably beyond my abilities to make happen.<br><br><div class="gmail_quote">On Wed, Sep 9, 2009 at 05:45, Jon Schutz <span dir="ltr">&lt;<a href="mailto:jon%2Bcatalyst@youramigo.com">jon+catalyst@youramigo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">How would this patch affect systems that choose to encode their URLs in<br>
something other than UTF-8? (Other character encodings are widely used,<br>
particularly on Asian sites).<br>
<br>
There might be a case for having the encoding type as a configurable<br>
option (where one option is no decoding so the application can handle<br>
it) - otherwise it has to be left to the application where the app<br>
designers can reverse whatever encoding they have chosen.<br>
<font color="#888888"><br>
--<br>
Jon Schutz                        My tech notes <a href="http://notes.jschutz.net" target="_blank">http://notes.jschutz.net</a><br>
Chief Technology Officer                        <a href="http://www.youramigo.com" target="_blank">http://www.youramigo.com</a><br>
YourAmigo<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
<br>
On 09/09/2009 11:15 AM, Rod Taylor wrote:<br>
&gt; I have a URL which includes UTF8 components which are in the chained<br>
&gt; (CaptureArgs) position. The escape mechanism is supposed encode each<br>
&gt; byte of the UTF8 sequence individually when creating the URL (which<br>
&gt; Catalyst seems to do) and reverse this on the way in.<br>
&gt;<br>
&gt; The below adjustment appears to fix the issue I&#39;m having with URL<br>
&gt; arguments not being decoded on the way in.<br>
&gt;<br>
&gt; This may not be the right place to handle it as it could break older<br>
&gt; applications which work around arguments not being decoded properly to UTF8.<br>
&gt;<br>
&gt; This makes a good test URL.<br>
&gt;<br>
&gt; $uri = $c-&gt;uri_for( $cont-&gt;action_for($action), [&#39;VÜ Living&#39;, &#39;他们有理<br>
&gt; 性和良心&#39; ]);<br>
&gt;<br>
&gt; Should result in VÜ Living and 他们有理性和良心 being in the first and<br>
&gt; second captured arguments.<br>
&gt;<br>
&gt;<br>
&gt; *** Chained.pm.orig     Tue Sep  8 21:10:10 2009<br>
&gt; --- Chained.pm  Tue Sep  8 21:35:38 2009<br>
&gt; ***************<br>
&gt; *** 168,174 ****<br>
&gt;<br>
&gt;       $request-&gt;action(&quot;/${action}&quot;);<br>
&gt;       $request-&gt;match(&quot;/${action}&quot;);<br>
&gt; !     $request-&gt;captures($captures);<br>
&gt;       $c-&gt;action($action);<br>
&gt;       $c-&gt;namespace( $action-&gt;namespace );<br>
&gt;<br>
&gt; --- 168,187 ----<br>
&gt;<br>
&gt;       $request-&gt;action(&quot;/${action}&quot;);<br>
&gt;       $request-&gt;match(&quot;/${action}&quot;);<br>
&gt; !<br>
&gt; !     # Decode Captures<br>
&gt; !     my $decodedCaptures = [];<br>
&gt; !     if ($captures &amp;&amp; @$captures) {<br>
&gt; !       for my $arg (@{$captures}) {<br>
&gt; !             $arg =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;<br>
&gt; !             utf8::downgrade($arg);<br>
&gt; !             utf8::decode($arg);<br>
&gt; !             push(@{$decodedCaptures}, $arg);<br>
&gt; !       }<br>
&gt; !     }<br>
&gt; !     $request-&gt;captures($decodedCaptures);<br>
&gt;       $c-&gt;action($action);<br>
&gt;       $c-&gt;namespace( $action-&gt;namespace );<br>
&gt;<br>
&gt;<br>
</div></div>&gt; ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">&gt;<br>
&gt; _______________________________________________<br>
&gt; List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
&gt; 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>
&gt; 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>
&gt; Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<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>
</div></div></blockquote></div><br>