[TYPO3-core] RFC #11696: External files with Umlauts/special chars in filename are not indexed

Dmitry Dulepov dmitry.dulepov at gmail.com
Wed Mar 24 08:15:35 CET 2010


Hi!

Steffen Kamper wrote:
> Just a question - when is rawurlencode used, when urlencode, both seemed
> to be mixed up in core.

Best illustrated by example:

Source:
================
<?php

$source = '/path/to/ūnūsual letters';
echo 'rawurlencode: ' . rawurlencode($source) . chr(10);
echo 'urlencode: ' . urlencode($source) . chr(10);
================

Result:
================
rawurlencode: %2Fpath%2Fto%2F%C5%ABn%C5%ABsual%20letters
urlencode:    %2Fpath%2Fto%2F%C5%ABn%C5%ABsual+letters
================

urlencode converts space to +. urldecode takes that into account.
rawurlencode does not. Generally urlencode is more better for decoding
but rawurluencode is better for encoding:
- urldecode will decode result of both rawurlencode and urlencode
- rawurlencode will produce result compatible with both urldecode and
rawurldecode

-- 
Dmitry Dulepov
TYPO3 expert / TYPO3 security team member Read more @
http://dmitry-dulepov.com/


More information about the TYPO3-team-core mailing list