Am Sonntag, 3. Januar 2016 22:14:27 UTC+1 schrieb LarsSoem:
>
> Hi
>
> Strange. I have
>
> # mojo version
> CORE
>   Perl        (v5.20.2, linux)
>   Mojolicious (5.54, Tiger Face)
>
> # dpkg -l apache2 | grep apache
> ii  apache2        2.4.10-10+deb8u3 amd64        Apache HTTP Server
>
> # cat /etc/default/locale
> #  File generated by update-locale
> LANG=en_DK.UTF-8
> LANGUAGE="en_US:en"
> LC_TIME=en_DK.UTF-8
>

Here I have:

root@w4:/home/helmut# cat /etc/default/locale 

#  File generated by update-locale

LANG="en_US.UTF-8"


I always install all locales (because some apps need them), but only 
configure them per user:


helmut@w4:~$ locale

LANG=en_US.UTF-8

LANGUAGE=

LC_CTYPE="en_US.UTF-8"

LC_NUMERIC="en_US.UTF-8"

LC_TIME="en_US.UTF-8"

LC_COLLATE="en_US.UTF-8"

LC_MONETARY="en_US.UTF-8"

LC_MESSAGES="en_US.UTF-8"

LC_PAPER="en_US.UTF-8"

LC_NAME="en_US.UTF-8"

LC_ADDRESS="en_US.UTF-8"

LC_TELEPHONE="en_US.UTF-8"

LC_MEASUREMENT="en_US.UTF-8"

LC_IDENTIFICATION="en_US.UTF-8"

LC_ALL=



> Mojolicious version 5.54 is the one in Debian stable.
> I have tried to upgrade to 6.17, but it seems to change nothing.
>

You can install Mojolicious via CPAN (I did). Or install it directly per 
webspace and set the lib to it.

But I never watched this behaviour beginning from version 4.x to 6.x. I 
have 8 Mojo-apps still in production on the last three Debian versions.

Do you maybe 'use utf8;' somewhere in the  source and apply a regex or join 
a literal string with non-ASCI characters?

Try to reproduce with a minimal app like my example.

Helmut Wollmersdorfer


> /LarsSoem
>
>
> On Sunday, January 3, 2016 at 7:56:52 PM UTC+1, Helmut Wollmersdorfer 
> wrote:
>>
>> Hi,
>>
>> I cannot reproduce it.
>>
>> # mojo version
>> CORE 
>>   Perl        (v5.20.2, linux) 
>>   Mojolicious (6.17, Clinking Beer Mugs)
>>
>> # dpkg -l apache2 | grep apache
>>
>> ii  apache2        2.4.10-10+deb8u3 amd64        Apache HTTP Server
>>
>>
>> $routes->get('/diag/#parm')->to('diag#show');
>>
>> sub show {
>>   my $self = shift;
>>
>>   # Render $page
>>   $self->render_not_found
>>     unless $self->render();
>> }
>>
>>
>> % layout 'default';
>> % title 'Diag for parm';
>>
>> <h1>Diag for parm <%= $parm %></h1> 
>>
>> <pre>
>> <%= dumper $parm %>
>>
>> <%= dumper \%ENV %>
>> </pre>
>>
>>
>> http://cpancover.wollmersdorfer.org/diag/æøå 
>> <http://cpancover.wollmersdorfer.org/diag/%C3%A6%C3%B8%C3%A5>
>>
>> Rendered:
>>
>> Diag for parm æøå
>>
>> Dumper of $parm:
>>
>> "\x{e6}\x{f8}\x{e5}"
>>
>>
>> OK, is character mode.
>>
>> From Dumper of %ENV:
>>
>> "PATH_INFO" => "/\303\246\303\270\303\245",
>>
>> "REQUEST_URI" => "/diag/%C3%A6%C3%B8%C3%A5",
>>
>>
>> OK, both confirming Plack/PSGI.
>>
>> So, something must be different.
>>
>> Browser? Latest Chrome, FireFox and Safari work for me.
>>
>> Try http://cpancover.wollmersdorfer.org/diag/something, it's online.
>>
>> HTH
>>
>> Helmut Wollmersdorfer
>>
>>
>> Am Sonntag, 3. Januar 2016 13:41:14 UTC+1 schrieb LarsSoem:
>>>
>>> I can reproduce the problem with an apache config as simple as
>>>
>>> <VirtualHost *:80>
>>>    DocumentRoot /usr/share/lh-webserver/www
>>>    <Perl>
>>>       $ENV{PLACK_ENV} = 'production';
>>>       $ENV{MOJO_MODE} = 'deployment';
>>>    </Perl>
>>>    <Location /test>
>>>       SetHandler          perl-script
>>>       PerlResponseHandler Plack::Handler::Apache2
>>>       PerlSetVar          psgi_app 
>>> /home/lh/work/mojolicious/utf8url/script/test
>>>    </Location>
>>> </VirtualHost>
>>>
>>>
>>> I run Apache 2.4.10. Btw, observe that in
>>>
>>> http://foo/æøå
>>>
>>> matched by
>>>
>>> $r->get('/foo/#arg')->to('foo#arg');
>>>
>>> the 'arg' become double encoded whereas in
>>>
>>> http://foo?arg=æøå
>>>
>>> the 'arg' is ok.
>>>
>>> /LarsSoem
>>>
>>> On Saturday, January 2, 2016 at 12:01:41 AM UTC+1, Helmut Wollmersdorfer 
>>> wrote:
>>>>
>>>>
>>>>
>>>> Am Dienstag, 29. Dezember 2015 15:12:13 UTC+1 schrieb LarsSoem:
>>>>>
>>>>> I have the same problem with double encoded utf8 characters in url's 
>>>>> when deplaying a Mojolicious app under Apache using "PerlResponseHandler 
>>>>> Plack::Handler::Apache2". No problem with morbo or plackup.
>>>>>
>>>>>
>>>> Please post your Apache-conf.
>>>>
>>>> Never had this problem on Debian.
>>>>
>>>> Here an example:
>>>>
>>>> <VirtualHost *:80>
>>>>     DocumentRoot /var/www/cpancover.wollmersdorfer.org 
>>>>
>>>>     ServerName cpancover.wollmersdorfer.org 
>>>>  
>>>>     PerlOptions +Parent 
>>>>
>>>>     <Perl> 
>>>>       $ENV{PLACK_ENV} = 'production'; 
>>>>       $ENV{MOJO_HOME} = '/var/www/cpancover.wollmersdorfer.org'; 
>>>>       $ENV{MOJO_MODE} = 'deployment'; 
>>>>       $ENV{MOJO_RELOAD} = 1; 
>>>>       $ENV{MOJO_LOG_LEVEL} = 'debug'; 
>>>>       use lib ( "/var/www/cpancover.wollmersdorfer.org/lib"); 
>>>>     </Perl> 
>>>>
>>>>     <Location /> 
>>>>       Order allow,deny 
>>>>       Allow from all 
>>>>       SetHandler perl-script 
>>>>       PerlHandler Plack::Handler::Apache2 
>>>>       PerlSetVar psgi_app /var/www/
>>>> cpancover.wollmersdorfer.org/script/wcpancover 
>>>>     </Location>
>>>>
>>>> </VirtualHost>
>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to