[TYPO3-core] RFC #9632: Bug: Multiple fileuploads into folders with special characters (umlauts) not possible

Martin Kutschker masi-no at spam-typo3.org
Thu Oct 30 09:58:01 CET 2008


Marcus Krause schrieb:
> Martin Kutschker schrieb:
>> Marcus Krause schrieb:
>>> Martin Kutschker schrieb:
>>>> Marcus Krause schrieb:
>>>>> This is an SVN patch request.
>>>>>
>>>>> Type: Bugfix
>>>>>
>>>>> Bugtracker references:
>>>>> http://bugs.typo3.org/view.php?id=9632
>>>>>
>>>>> Branches:
>>>>> TYPO3_4-1 & TYPO3_4-2 & trunk
>>>>>
>>>>> Problem:
>>>>> JS function escape() is used to escape target-url parameter for a page
>>>>> reload when choosing multiple fileupload. Escape() is known to not be
>>>>> able to handle unicode characters.
>>>>>
>>>>> Solution:
>>>>> Replace JS function escape() by encodeURIComponent().
>>>>>
>>>>> Notes:
>>>>> Tested successfully on a utf-8 BE with FF, IE and Opera.
>>>> Please test with iso-8859-1. It' break because you only change the
>>>> encoding but not the decoding. encodeURIComponent() will turn it's
>>>> argument to utf-8, so you must revert this recoding on the receiving
>>>> end. decodeURIComponent() in JS will do that for you, but in PHP you
>>>> must do this manually.
>>> Although folders with umlauts will only be possible to create on a utf8
>>> backend and ['SYS']['UTF8filesystem'] config enabled
>> Oh, sorry, of course.
>>
>>> I made a patch
>>> that converts the utf8 parameter to the current BE charset.
>> Thanx. I'm still confused because I don't see the revesral of the
>> escape/encodeURI, but I guess this happens somewhere outside of the
>> patch. I'll have to check.
> 
> No, it's in there:
> /**
>  * Charset processing object
>  *
>  * @var t3lib_cs
>  */
> var $basiccs;
> $this->basiccs = t3lib_div::makeInstance('t3lib_cs');
> $this->target =
> $this->basiccs->conv($this->target,'utf-8',$GLOBALS['LANG']->charSet);

This is only the conversion from one character set to another. But
encodeURIComponent() will produce something like foo%24bar. that must be
decoded somewhere.

Masi


More information about the TYPO3-team-core mailing list