| Anonymous | Login | Signup for a new account | 10-27-2025 20:24 PDT |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ 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 | Platform | ||||||||
| Status | new | OS | ||||||||||
| Projection | none | OS Version | ||||||||||
| ETA | none | Fixed in Version | Product Version | 4.0.10 | ||||||||
| Product Build | ||||||||||||
| 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] |
|||||||||||
| Steps To Reproduce | ||||||||||||
| 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. |