четверг, 7 августа 2014 г., 11:40:23 UTC+4 пользователь Graham Dumpleton 
написал:
>
> Lets go back a bit.
>
> You are using print() to output it with each?
>
Yes 

>
> One you are viewing on stdout of terminal where wsgiref ran and other you 
> are viewing in Apache error log. Correct?
>
Yes 

>
> What tool are you using to view the result in the Apache error log?
>

tail -f /var/log/httpd/error_log
 

>
> Graham
>
> On 07/08/2014, at 5:31 PM, Dmitriy Chugunov <[email protected] 
> <javascript:>> wrote:
>
>
>> In Python 3 it is horrible as you need to do a dance as the although it 
>> comes through as a Unicode string, it is supposed to be as the byte value 
>> string as Latin-1. This is meant you are supposed to convert it back to a 
>> byte string as Latin-1 and then back to Unicode as UTF-8.
>>
>> s = urllib.parse.unquote('%D0%98%D0%B2%D0%B0%D0%BD', 
>> encoding='Latin-1').encode('Latin-1')
>> >>> s
>> b'\xd0\x98\xd0\xb2\xd0\xb0\xd0\xbd'
>> >>> s.decode('UTF-8')
>> 'Иван'
>>
>> Under wsgiref.simple_server it works, but under Apache it again gives 
> just \xd0\x98\xd0\xb2\xd0\xb0\xd0\xbd
>
>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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 http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to