Anonymous | Login | Signup for a new account | 11-24-2024 22:37 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0004255 | [Quercus] | minor | have not tried | 10-09-10 07:39 | 10-27-10 05:00 | |||||||
Reporter | domdorn | View Status | public | |||||||||
Assigned To | ||||||||||||
Priority | normal | Resolution | open | |||||||||
Status | new | Product Version | 4.0.10 | |||||||||
Summary | 0004255: json_encode(double) not working like in native php | |||||||||||
Description |
rep by siruslan http://forum.caucho.com/showthread.php?t=18816 [^] <?php $arr = array (10.1); echo json_encode($arr); ?> standart PHP -> [10.1] quercus PHP -> [10,100000000000] |
|||||||||||
Additional Information |
I found problem in com.caucho.quercus.env.DoubleValue method toString() contains next code Code: String v = String.format("%." + digits + "f", _value); if change this code to Code: DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance(); dfs.setDecimalSeparator('.'); DecimalFormat df = new DecimalFormat(); df.setMaximumFractionDigits(digits); df.setDecimalFormatSymbols(dfs); String v = df.format(_value); result will be normal |
|||||||||||
Attached Files | ||||||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed. 27 unique queries executed. |