{ "id": "86850", "key": "TIMOB-7782", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [], "resolution": null, "resolutiondate": null, "created": "2012-02-22T17:00:22.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [], "assignee": null, "updated": "2018-03-06T18:57:57.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "One should be able to open, get the content and then display UTF-16 encoded TXT files into a Ti.UI.TextArea. There is a workaround in iPad to read the UTF-16 encoded file with the help of Titanium.UI.iPad.DocumentViewer\r\nh4. Repro Steps\r\n1. Run the below code.\r\n2. Can't read the UTF-16 encoded text file, everything works fine with UTF-8 encoded file.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow(); \r\nvar textArea = Ti.UI.createTextArea({width:\"100%\", height:\"100%\", backgroundColor:\"#FFFFFF\"}); \r\ntextArea.value = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,\"WBCTDOC_806.txt\").read().text; \r\nwin.add(textArea); \r\nwin.open();\r\n\r\n{code}\r\n\r\nAttached is the file which is to be opened.", "attachment": [ { "id": "25864", "filename": "WBCTDOC_806.txt", "author": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-22T17:00:22.000+0000", "size": 204, "mimeType": "text/plain" } ], "flagged": false, "summary": "iOS: Able to read UTF-16 encoded text file", "creator": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS5\r\nTi SDK 1.8.0.1\r\nTi SDK 1.8.1", "comment": { "comments": [], "maxResults": 4, "total": 4, "startAt": 0 } } }