{ "id": "81852", "key": "TIMOB-6922", "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": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13277", "name": "Sprint 2012-08", "archived": true, "released": true, "releaseDate": "2012-04-22" }, { "id": "13270", "description": "Release 1.8 Service Pack 3 (CI for 1_8_X)", "name": "Release 1.8.3", "archived": true, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-04-18T10:38:13.000+0000", "created": "2011-10-23T13:15:03.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "SupportTeam", "api", "parity" ], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "16539", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "81986", "key": "TIMOB-5878", "fields": { "summary": "Android: Titanium.UI.TextArea does not decode UTF8 character correctly. ", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14397", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "64203", "key": "TIMOB-3571", "fields": { "summary": "Android: Network - responseText of createHTTPClient invalid for UTF8 encoding", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-05-07T16:17:40.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Problem\r\n\r\nWhen loading some JSON file (UFT-8) from the web and displaying the data, the Non-Ascii-chars text is garbled.\r\n\r\nSee attached screenshot of this problem on 1.7.2\r\n\r\nNote that this works fine on iPhone.\r\n\r\nThe Kitchen Sink Demo of XHR has the same problem. It works on the iPhone but fails on Android.\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\nTi.UI.setBackgroundColor('#ddd'); \r\nvar win = Ti.UI.createWindow({});\r\n\r\nvar loadDataButton = Ti.UI.createButton({\r\n title: \"Let's load UTF-8 from the web!\", width: 260, top: 50, height: 40\r\n});\r\nwin.add(loadDataButton);\r\nloadDataButton.addEventListener('click', function() {\r\n var test1 = loadFromWeb(\"http://crossplattformvergleich.dnsalias.org/test.js\"); /* file contains in UTF8: { \"result\" : \"áäüÖßÉ?\" } and a comment */\r\n var test2 = loadFromWeb(\"http://crossplattformvergleich.dnsalias.org/test2.js\"); /* this is a 36-byte file. Appears as 0 bytes on android */\r\n});\r\n\r\nfunction loadFromWeb(url) {\r\n var asyncRequest = Ti.Network.createHTTPClient();\r\n asyncRequest.timeout = 30*1000;\r\n asyncRequest.open(\"GET\", url); \r\n asyncRequest.onload = loadCallback;\r\n asyncRequest.send();\r\n}\r\n\r\nfunction loadCallback() {\r\n alert(this.responseText);\r\n}\r\n\r\nwin.open();\r\n{code}\r\n\r\nh2. Discussions\r\n\r\nQ&A: [problem fetching uft-8 content on android|http://developer.appcelerator.com/question/126712/problem-fetching-uft-8-content-on-android#comment-101538]\r\n", "attachment": [ { "id": "24867", "filename": "00000028.png", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-29T06:15:44.000+0000", "size": 163773, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Network - HTTPClient cannot retrieve non-ascii data", "creator": { "name": "fex80", "key": "fex80", "displayName": "Felix Alcala", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fex80", "key": "fex80", "displayName": "Felix Alcala", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* Titanium 1.7.2 + 1.7.3\r\n* Android Emulator 2.2, Emulator 2.3, Samsung Galaxy ACE\r\n* MacOS X 10.6.8\r\n* Titanium Studio, build: 1.0.4.201108101535 Build: jenkins-titanium-rcp-master-40 (origin/master) Date: 10 August 2011, 15:39:05", "comment": { "comments": [ { "id": "177556", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for raising this ticket, Felix. Please note the changes I have made, that were necessary before I could escalate it. Keeping to the [How to Submit a Bug Report|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report] guide means that your tickets can be escalated more quickly.\r\n\r\nHence, all information must be included in the ticket, rather than rely on external sources.\r\n\r\nRegarding the following, note that a ticket may only describe a single bug. If you have found a second bug, please raise another ticket.\r\n\r\n{code}\r\nAlso, I found another bug where an UTF-8 file fetched by android is very small (< 50 bytes), then in the callback this.responseText is NULL. On the iPhone, it all works as intended.\r\n{code}\r\n\r\nI will move this to the main project now.\r\n\r\nCheers\r\n", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-29T06:19:10.000+0000", "updated": "2011-12-29T06:19:10.000+0000" }, { "id": "194034", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2.0.2.v20120505151714 with Samsung Nexus S 4.0.4", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-07T16:17:40.000+0000", "updated": "2012-05-07T16:17:40.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }