I can not reproduce your problems using the same settings. Try to use the latest release (1.11.x)
Thomas Weidner Zend Framework Certified Engineer & I18N Team Leader <http://www.thomasweidner.com> http://www.thomasweidner.com -----Ursprüngliche Nachricht----- Von: Fred Garlov [mailto:[email protected]] Gesendet: Donnerstag, 14. April 2011 10:05 An: [email protected] Betreff: [fw-general] Zend_Locale_Format::toNumber fails Hello! <http://framework.zend.com/manual/en/zend.locale.parsing.html> http://framework.zend.com/manual/en/zend.locale.parsing.html Following example is not working for me: $locale = new Zend_Locale('de_AT'); $number = Zend_Locale_Format::toNumber(13547.3678, array('precision' => 2, 'locale' => $locale)); // will return 13.547,37 print $number; will return 1.354.736.780,00, if server locale is 'de_DE'. The problem is, Zend_Locale_Math::normalize($value) is called multiple time which transforms float 13547,3678 (var_dump output floats localized) string '13547,3678' (length=10) string '13547.3678' (length=10) string '135473678' (length=9) string '135473678.0' (length=11) string '1354736780' (length=10) Could it be fixed, please. This issue makes toNumber function unusable. Output from localeconf(): $convert = localeconv(); $convert = ( [decimal_point] => , [thousands_sep] => . [int_curr_symbol] => EUR [currency_symbol] => € [mon_decimal_point] => , [mon_thousands_sep] => . [positive_sign] => [negative_sign] => - [int_frac_digits] => 2 [frac_digits] => 2 [p_cs_precedes] => 0 [p_sep_by_space] => 1 [n_cs_precedes] => 0 [n_sep_by_space] => 1 [p_sign_posn] => 1 [n_sign_posn] => 1 [grouping] => Array ( [0] => 3 [1] => 3 ) [mon_grouping] => Array ( [0] => 3 [1] => 3 ) ) -- List: <mailto:[email protected]> [email protected] Info: <http://framework.zend.com/archives> http://framework.zend.com/archives Unsubscribe: <mailto:[email protected]> [email protected]
