[TYPO3-core] UTF-8 in file names
Karsten Dambekalns
karsten at typo3.org
Thu Nov 23 10:57:55 CET 2006
Hi.
On 22.11.2006, at 20:41, Ingmar Schlecht wrote:
> Do you think the patch is well-tested enough to commit it to trunk?
I have some comments. This morning I checked why masi_utf8fs 0.1.0
ate all uppercase letters. As Martin already suggested it was because
of a mistake in the preg_replace in
ux_t3lib_extFileFunctions::cleanFileName(), this is the fixed line
(the same as in ux_t3lib_basicFileFunctions::cleanFileName()):
return preg_replace('/[\x00-\x2C\/\x3A-\x3F\x5B-\x60\x7B-\xBF]/
u','_',trim($fileName));
The "original" had one zero too much. Then you can upload and create
not only files/directories with UTF-8 characters, but also good old
harmless uppercase letters... :)
I have some more questions, though: The patch/ext still replaces
space with _, the same is true for "[] and otehr characters. I hereby
publicly raise the question: We could allow them, no? Shell arguments
should be escaped properly anyway, the regular PHP file functions can
cope with those characters fine (I have been using directories with
spaces in their names for a while just fine).
Regards,
Karsten
--
Karsten Dambekalns
Gimme Five!
http://typo3.org/gimmefive
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 304 bytes
Desc: This is a digitally signed message part
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061123/c482f20a/attachment.pgp
More information about the TYPO3-team-core
mailing list