Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
4255 | minor | have not tried | 10-09-10 07:39 | 10-27-10 05:00 | |
|
|||||
Reporter: | domdorn | Platform: | |||
Assigned To: | OS: | ||||
Priority: | normal | OS Version: | |||
Status: | new | Product Version: | 4.0.10 | ||
Product Build: | Resolution: | open | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
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 |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|