Project

General

Profile

Actions

Bug #75780

closed

Invalid number format because of miscellaneous decimal separator

Added by D. Röhrig over 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Fluid
Target version:
Start date:
2016-04-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The fluid method format.number is not working properly anymore since this commit [[https://forge.typo3.org/projects/typo3cms-core/repository/revisions/608631a3a080ccb6436c7e277af036a0c6a0ccaa]]. The reason is, that this change specifies the LC_NUMERIC now correctly.

But the resulting problem is, that format.number only works with numbers, which have a point as decimal separator. But with a comma as saparator like in the locale de_DE, it won't work anymore. I resolved the problem with


setlocale(LC_NUMERIC, 'C');

but this is not a proper solution, because the bug is somewhere in fluid. It is also a problem for the VHS viewhelper (<v:math.round decimals="2">).

My example code:


<f:format.number decimals="2">
<v:math.division b="1048576">
<v:media.size path="public{downloadfile.identifier}"/>
</v:math.division>
</f:format.number>


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #75141: config.locale_all does not set LC_ALLClosed2016-03-16

Actions
Has duplicate TYPO3 Core - Bug #75920: Extbase generic persistence casting float value to string causes wrong values if system locale is germanClosed2016-04-26

Actions
Actions

Also available in: Atom PDF