|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 2092 | minor | sometimes | 10-19-07 09:07 | 09-04-08 16:57 | |
|
|
|||||
| Reporter: | hendler | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.1.3 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.2.1 | ||
|
|
|||||
| Summary: | 0002092: json_encode (or another part of the Resin system) should return UTF-8 - maybe | ||||
| Description: |
http://php.net/json_decode [^] requires UTF-8 - it seems. To reproduce - have a 5.2.1 regular PHP as a json_decode client. Do a json_encode from quercus containing UTF-8 chars. The json_decode will return false (see notes - it may be the Zend HTTP client that does this.) |
||||
| Steps To Reproduce: | |||||
| Additional Information: |
My workaround is to do this in the PHP environment, where $response->getBody() is from Zend Framework HTTP client (which I'm sorry to say may actually be the problem - but I thought I'd post it here in case it comes up again). This converts the string to UTF-8. ... $response_converted = (function_exists('iconv'))? iconv("ISO-8859-1","UTF-8", $response->getBody()):$response->getBody(); return json_decode($response_converted,true); |
||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||