{ "id": "164673", "key": "AC-4640", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2016-12-01T14:34:04.000+0000", "created": "2016-11-24T09:37:27.000+0000", "labels": [ "ios" ], "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": "2016-12-01T14:34:04.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Hello.\r\n\r\nOn Android build made on Windows computer this is working fine.\r\n\r\nOn my MAC computer making the iOS build however I can not get this to work.\r\n\r\nI open an URL like this : \r\n{code:javascript}\r\nvar test = 'æøå';\r\nvar test2 = 'MoreÆØÅ';\r\nvar url = 'https://somesite.com/?getParam1=' +test+ '&getParam2=' + test2;\r\nopenURL(url);\r\n{code}\r\n---\r\n\r\nResult is a messed up string . I have also tried using {{Ti.Network.encodeURIComponent('øæå');}} with the same result.", "attachment": [], "flagged": false, "summary": "openURL UTF8 GET parameters problem", "creator": { "name": "nomorhop", "key": "nomorhop", "displayName": "Morten Hopstad", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nomorhop", "key": "nomorhop", "displayName": "Morten Hopstad", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Macbook Air", "comment": { "comments": [ { "id": "401826", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, What Titanium SDK are you using? Can you send a full sample code? Use the latest studio and SDK version. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-11-24T18:40:41.000+0000", "updated": "2016-11-24T18:40:41.000+0000" }, { "id": "401838", "author": { "name": "nomorhop", "key": "nomorhop", "displayName": "Morten Hopstad", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello. I'm using the latest version of everything. (SDK is V6.0.0.GA)\r\n\r\nMy code is used for opening a direct chat into a company and includes some semi-private keys etc. Therfor it will be difficult for me to show this exact code online for the public to see.\r\n\r\nIm doing the same thing on both the Android version and the iOS version. As mentioned, the Android version built on the Windows computer works fine but the iOS built on MAC shows the following:\r\n\r\n\r\n{code:java}\r\n// Make URL\r\nvar url = 'url.somecompany.com';\r\n\r\n// Some variables\r\nvar customerKey = \"123456\";\r\nvar something = 'æøå';\r\n\r\n// Add parameters to URL\r\nurl = url + \r\n'?customerKey=' + customerKey +\r\n'&something=' + something;\r\n\r\n// Open browser\r\nTitanium.Platform.openURL(url);\r\n\r\n// This opens a site that shows some of the given variables back to the user. \"something\" in this case.\r\n// It shows like this %C3%A6%C3%B8%C3%A5\r\n// Same result with and without Ti.Network.encodeURIComponent();\r\n{code}\r\n", "updateAuthor": { "name": "nomorhop", "key": "nomorhop", "displayName": "Morten Hopstad", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-25T08:16:02.000+0000", "updated": "2016-11-25T08:17:25.000+0000" }, { "id": "401856", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Two things here:\r\n- The {{Ti.Network.encodeURIComponent}} works correctly, it encodes it utf-8 conform\r\n- You should try to avoid (un-encoded) special characters in requests, and if you do, your server would need to know how to deal with the encoded URI-string.\r\n\r\nThis does not like an Titanium issue to me. Please try [this link|http://httpbin.org/get?param=More%C3%86%C3%98%C3%85] which will encode it the same way as the method does. We can test it with a native project as well, but it will most likely be the same.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-27T19:31:48.000+0000", "updated": "2016-11-27T19:35:01.000+0000" }, { "id": "401871", "author": { "name": "nomorhop", "key": "nomorhop", "displayName": "Morten Hopstad", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello and thank you for respons.\r\n\r\nMy first thought was also that this was how the server is handling these encoded strings.\r\n\r\nBut then I can see it's working in 2 of 3 cases. That was what made question Titanium and made a ticket.\r\n\r\nAndroid Build : Works fine. The string is decoded on the server and shows properly.\r\nWebsite (Javascript) : Works fine. Using URI-encoding (encodeURI())\r\niOS : Trouble. Cant be decoded.", "updateAuthor": { "name": "nomorhop", "key": "nomorhop", "displayName": "Morten Hopstad", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-28T07:28:22.000+0000", "updated": "2016-11-28T07:28:22.000+0000" }, { "id": "402287", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I tried testing in simulator with your sample code. I wasn't able to reproduce the issue in iOS, The URL is same as it should be. \r\n\r\n{code}\r\nhttps://somesite.com/?getParam1=æøå&getParam2=MoreÆØÅ\r\n{code}\r\n\r\nSee my [screenshot|http://i64.tinypic.com/11vlely.jpg] of the browser trying to open the url in iOS simulator.\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.11.6\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\n\r\nNode.js\r\n Node.js Version = 4.2.2\r\n npm Version = 2.14.7\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.10\r\n\r\nTitanium SDK\r\n SDK Version = 6.0.0.GA\r\n{code}\r\n ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-11-30T22:40:36.000+0000", "updated": "2016-11-30T22:42:04.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }