I have a URL which includes UTF8 components which are in the chained (CaptureArgs) position. The escape mechanism is supposed encode each byte of the UTF8 sequence individually when creating the URL (which Catalyst seems to do) and reverse this on the way in.<br>
<br>The below adjustment appears to fix the issue I&#39;m having with URL arguments not being decoded on the way in.<br><br>This may not be the right place to handle it as it could break older applications which work around arguments not being decoded properly to UTF8.<br>
<br>This makes a good test URL.<br><br>$uri = $c-&gt;uri_for( $cont-&gt;action_for($action), [&#39;VÜ Living&#39;, &#39;他们有理性和良心&#39; ]);<br><br>Should result in VÜ Living and 他们有理性和良心 being in the first and second captured arguments.<br>
<br><br>*** Chained.pm.orig     Tue Sep  8 21:10:10 2009<br>--- Chained.pm  Tue Sep  8 21:35:38 2009<br>***************<br>*** 168,174 ****<br>  <br>      $request-&gt;action(&quot;/${action}&quot;);<br>      $request-&gt;match(&quot;/${action}&quot;);<br>
!     $request-&gt;captures($captures);<br>      $c-&gt;action($action);<br>      $c-&gt;namespace( $action-&gt;namespace );<br>  <br>--- 168,187 ----<br>  <br>      $request-&gt;action(&quot;/${action}&quot;);<br>      $request-&gt;match(&quot;/${action}&quot;);<br>
! <br>!     # Decode Captures<br>!     my $decodedCaptures = [];<br>!     if ($captures &amp;&amp; @$captures) {<br>!       for my $arg (@{$captures}) {<br>!             $arg =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;<br>!             utf8::downgrade($arg);<br>
!             utf8::decode($arg);<br>!             push(@{$decodedCaptures}, $arg);<br>!       }<br>!     }<br>!     $request-&gt;captures($decodedCaptures);<br>      $c-&gt;action($action);<br>      $c-&gt;namespace( $action-&gt;namespace );<br>