[TYPO3-dam-devel] RFC #10408: No replacement of special characters after upload in non-UTF-8-installations
Lorenz Ulrich
lorenz-typo3 at visol.ch
Sat Jan 22 23:52:11 CET 2011
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
More information about the TYPO3-team-dam
mailing list