{ "id": "118198", "key": "TIMOB-14794", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15597", "description": "2013 Sprint 17", "name": "2013 Sprint 17", "archived": true, "released": true, "releaseDate": "2013-08-23" }, { "id": "15599", "description": "2013 Sprint 17 API", "name": "2013 Sprint 17 API", "archived": true, "released": true, "releaseDate": "2013-08-23" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-08-16T23:30:36.000+0000", "created": "2013-08-09T15:38:45.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T20:34:18.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem description\r\nTrying to load a document encoded not with UTF-8 (in the sample, Chinese Big5), the responseText returned is not shown correctly.\r\n\r\nh2. Steps to reproduce\r\nUse the following code:\r\n\r\n{code}\r\nvar xhr = Ti.Network.createHTTPClient({\r\n\tonload: function() {\r\n\t\talert(this.responseText);\r\n\t}\r\n});\r\nxhr.open(\"GET\", BIG5_FILE_URL);\r\nxhr.send();\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: HttpClient responseText does not keep the correct encoding", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 6.1\r\nSDK 3.1.1\r\n", "comment": { "comments": [ { "id": "266902", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~dcassenti] This request won't possible for us to fix. The response from the url does not contain any information about the encoding type or charset involved. Without this information we cannot find out what encoding to be used for the response. So we try to decode it using utf8 first and if that fails we try 8-bit ISO Latin 1 encoding. This is the default behavior.\n\nHere is the response header that we get back from the url. \n(lldb) po [request responseHeaders]\n{\n \"Accept-Ranges\" = bytes;\n Connection = close;\n \"Content-Length\" = 83254;\n \"Content-Type\" = \"text/plain\";\n Date = \"Fri, 16 Aug 2013 17:17:43 GMT\";\n Etag = \"\\\"1c32204-14536-4e3ffa299d9c0\\\"\";\n \"Last-Modified\" = \"Thu, 15 Aug 2013 17:16:31 GMT\";\n Server = \"Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 mod_jk/1.2.35 mod_fcgid/2.3.6\";\n}\n\nThis ticket cannot be fixed unless some changes are done on the server side to include the encoding type or charset in the response header. ", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-16T17:31:34.000+0000", "updated": "2013-08-16T17:31:34.000+0000" }, { "id": "413932", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T20:34:18.000+0000", "updated": "2017-03-20T20:34:18.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }