{ "id": "170918", "key": "AC-5542", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2018-01-24T12:13:10.000+0000", "created": "2018-01-23T16:45:31.000+0000", "labels": [], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-01-24T12:13:16.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When using Ti.Codec.decodeString, I used ISO_LATIN_1 as the encoding, instead of the correct CHARSET_ISO_LATIN_1. \r\n\r\nThere was no error, but it did not work correctly. There should either be an error, or it should work the same.\r\n\r\nThis also happens with other encoding constants, like ASCII.", "attachment": [], "flagged": false, "summary": "ISO_LATIN_1 instead of CHARSET_ISO_LATIN_1", "creator": { "name": "dethier1958", "key": "dethier1958", "displayName": "Daniel Ethier", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "dethier1958", "key": "dethier1958", "displayName": "Daniel Ethier", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "433566", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~dethier1958],\r\nThanks for sharing with us. Please provide a full sample test code that regenerates the issue. Better to provide a sample app as an attachment here. We will test the issue in our environment. Also, provide the SDK and CLI version you are testing on. \r\n\r\nBest", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-24T04:46:44.000+0000", "updated": "2018-01-24T04:46:44.000+0000" }, { "id": "433582", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I don't exactly see what kind of change the SDK could do to improve this. {{Ti.Codec.ISO_LATIN_1}} will be {{null}}, so we could do a null-check for the constant in {{decodeString}} but that's really it. It's in the responsibility of the developer to pass the correct encodings / constants to the method, so I'd rather see this as an improvement than being a bug.\r\n\r\n*EDIT*: Looking at the code, it already falls back to UTF8 if a) the {{charset}} attribute is not passed or b) the attribute is passed but null. This is documented [here|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Codec-method-decodeString] as well:\r\n{quote}\r\nIf charset is specified, it determines the character encoding used to decode the string. Otherwise, UTF-8 is assumed.\r\n{quote}\r\n\r\nResolving issue as {{Won't do}}, I hope you are ok with that!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-24T12:11:02.000+0000", "updated": "2018-01-24T12:13:04.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }