Issue Bug Closed

#23596CLI dispatcher uses the locale from the shell

Oliver Klee 09/24/10, 12:22 updated 08/17/11, 18:47

Description

The locale (particularly, LC_NUMERIC (which is part of LC_ALL)) has an effect on how numbers are parsed. For example, the following code

$foo = floatval(‘3.14159’);

will result in 3.14159 for the “C” locale (or an English locale) and in 3 for any Germany locale.

When running TYPO3 via Apache (ie., using the FE or normal BE), this is no problem as PHP by default does not have a particular locale set. However, when running TYPO3 via the CLI mode, the locale used in the shell is used – and that often is something like “DE_de.utf8”.

So we need to reset the locale to make sure numbers are parsed correctly (and to have a clean slate).

This affects all branches 4.2, 4.2, 4.4 and the trunk.

I have only tested this on Linux. We’ll also need testing on Windows and Mac OS.
(issue imported from #M15790)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.