[TYPO3-dam-devel] RFC #10408: No replacement of special characters after upload in non-UTF-8-installations

Dan Osipov dosipov at phillyburbs.com
Tue Jan 25 23:49:39 CET 2011


Committed to 1.1 and trunk
Revisions 42605 and 42606 respectively

On 1/22/11 5:52 PM, Lorenz Ulrich wrote:
> Hi folks,
>
> this is an SVN patch request.
>
> Type: Bugfix
>
> Bugtracker reference: http://bugs.typo3.org/view.php?id=10408
>
> Branches: 1.1, trunk
>
> Problem:
> After uploads (media module and PopUp) DAM does not replace spaces or
> special characters (german imlauts) in the filename anymore. This only
> happens in non-UTF-8 installations.
>
> In DAM 1.1.7 and below spaces are only replaced when you have
> forceCharset = utf-8 and UTF8filesystem = 1. So you don't have any
> special character handling at all if you don't have these two options
> enabled.
>
> Solution:
> The attached patch makes use of t3lib_basicFileFunctions::cleanFileName
> function. This means that DAM will have the same behaviour as TYPO3
> itself, and that is:
>
> - If you have UTF-8 enabled (forceCharset and UTF8filesystem), spaces
> will be replaced, but UTF characters (like umlauts) will be preserved.
>
> my file name with überraschung.png will be
> my_file_name_with_überraschung.png
>
> - If you have another charset than UTF-8, spaces *and* umlauts will be
> replaced.
>
> my file name with überraschung.png will be
> my_file_name_with_ueberraschung.png
>
>
> Best regards,
>
>
> Lorenz

-- 
Dan Osipov
http://danosipov.com/blog


More information about the TYPO3-team-dam mailing list