Re: [INTERNALS-WIN] Question about using UTF-8 encoding for server variables used by PHP
| From: | Pierre Joye | Date: | Tue, 19 Jan 2010 14:11:41 +0000 |
| Subject: | Re: [INTERNALS-WIN] Question about using UTF-8 encoding for server variables used by PHP | ||
| References: | 1 2 3 4 5 | Groups: | php.internals.win |
| Request: | Send a blank email to internals-win+get-673@lists.php.net to get a copy of this message | ||
hi Ruslan,
Btw, what are the specs you use as reference about URL encoding and
FCGI environment variable encoding, to consider this behavior as
correct? As far as I remember it is the role of the application to do
this conversion, not the web server itself. I wonder if it is actually
a good idea to do it in IIS directly.
Cheers,
2010/1/9 Ruslan Yakushev <ruslany@microsoft.com>:
> Thanks Stas and Pierre for your comments! Based on this feedback we are planning to make this
> change only for REQUEST_URI and for PATH_INFO and make it configurable so that if it breaks anything
> then users can switch back to existing behavior.
>
>> -----Original Message-----
>> From: Stanislav Malyshev [mailto:stas@zend.com]
>> Sent: Friday, January 08, 2010 4:04 PM
>> To: Ruslan Yakushev
>> Cc: 'Pierre Joye'; 'internals-win@lists.php.net'
>> Subject: Re: [INTERNALS-WIN] Question about using UTF-8 encoding for
>> server variables used by PHP
>>
>> Hi!
>>
>> > If url contains non-ascii characters, e.g.
>> > http://mysite.com/2009/10/русские-символ,
>> > then this URL results in
>> > 404 in WordPress. WordPress uses REQUEST_URI server variable to get
>> > the originally requested URL. Over HTTP the non-english characters
>> > come as URL encoded, but IIS internally converts them to unicode.
>> > Then FastCGI module converts it back to ANSI before passing them to
>> > PHP.
>>
>> I think having REQUEST_URI in some salvageable form is better than
>> getting ???'s. Also, REQUEST_URI probably won't be used by the engine
>> directly for filename access, though may be used by application - like
>> MVC frameworks which route actions depending on REQUEST_URL.
>> IIRC PHP uses only SCRIPT_FILENAME and PATH_TRANSLATED from the request
>> for filesystem access, the rest is stored but not used to find the
>> script.
>> --
>> Stanislav Malyshev, Zend Software Architect
>> stas@zend.com http://www.zend.com/
>> (408)253-8829 MSN: stas@zend.com
>>
>> --
>> Windows Internals Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org