Issue Bug Resolved

#110966Remove SYS/UTF8filesystem and SYS/systemLocale

Benni Mack 10/08/26, 13:42 updated 10/09/26, 10:40

Description

$GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘UTF8filesystem’] and [‘SYS’][‘systemLocale’] let PHP’s string functions handle UTF-8 file names by switching LC_CTYPE to a UTF-8 system locale around certain calls. On the PHP versions supported today they no longer do anything useful, and part of what they cover is broken.

Tested with glibc (Debian 13) on PHP 8.2, 8.4 and 8.5:

- basename(), dirname() and pathinfo() give correct results for UTF-8 paths in every locale, including C. The locale switching in PathUtility::basename(), ::dirname() and ::pathinfo() has no effect.
- escapeshellarg() is the only function that still depends on the locale. Under LC_CTYPE=C it silently drops every non-ASCII byte:
– escapeshellarg(‘äöü.txt’) returns ‘.txt’
– escapeshellarg(‘Ünïcödé’) returns ‘ncd’

Under any UTF-8 locale, including C.UTF-8, it works correctly.

The current settings cover this only partly:

- CommandUtility::escapeShellArguments() switches the locale only when UTF8filesystem is enabled and systemLocale is set.
- The install tool accepts an empty systemLocale (“fine as long as no UTF-8 file system is used”).
- PHP-FPM often runs in the C locale, for example under systemd.
- indexed_search calls escapeshellarg() directly.

Reviews 2

History 15

  1. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-09T10:40:11+00:00" > 10/09/26, 10:40 </span>

    Applied in changeset commit:b1a79833d5700b3191c3f5bac7c6c8e8545de6a6.