{"action":"created","issue":{"url":"https://api.github.com/repos/gama-platform/gama/issues/2475","repository_url":"https://api.github.com/repos/gama-platform/gama","labels_url":"https://api.github.com/repos/gama-platform/gama/issues/2475/labels{/name}","comments_url":"https://api.github.com/repos/gama-platform/gama/issues/2475/comments","events_url":"https://api.github.com/repos/gama-platform/gama/issues/2475/events","html_url":"https://github.com/gama-platform/gama/issues/2475","id":344138698,"node_id":"MDU6SXNzdWUzNDQxMzg2OTg=","number":2475,"title":"[Feature/Regression] Unescape strings when saving variables to csv","user":{"login":"RCura","id":807703,"node_id":"MDQ6VXNlcjgwNzcwMw==","avatar_url":"https://avatars0.githubusercontent.com/u/807703?v=4","gravatar_id":"","url":"https://api.github.com/users/RCura","html_url":"https://github.com/RCura","followers_url":"https://api.github.com/users/RCura/followers","following_url":"https://api.github.com/users/RCura/following{/other_user}","gists_url":"https://api.github.com/users/RCura/gists{/gist_id}","starred_url":"https://api.github.com/users/RCura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RCura/subscriptions","organizations_url":"https://api.github.com/users/RCura/orgs","repos_url":"https://api.github.com/users/RCura/repos","events_url":"https://api.github.com/users/RCura/events{/privacy}","received_events_url":"https://api.github.com/users/RCura/received_events","type":"User","site_admin":false},"labels":[{"id":216670029,"node_id":"MDU6TGFiZWwyMTY2NzAwMjk=","url":"https://api.github.com/repos/gama-platform/gama/labels/%3E%20Enhancement","name":"> Enhancement","color":"009800","default":false},{"id":225423744,"node_id":"MDU6TGFiZWwyMjU0MjM3NDQ=","url":"https://api.github.com/repos/gama-platform/gama/labels/Affects%20Datafiles","name":"Affects Datafiles","color":"eb6420","default":false},{"id":217362248,"node_id":"MDU6TGFiZWwyMTczNjIyNDg=","url":"https://api.github.com/repos/gama-platform/gama/labels/Affects%20Usability","name":"Affects Usability","color":"eb6420","default":false},{"id":217362469,"node_id":"MDU6TGFiZWwyMTczNjI0Njk=","url":"https://api.github.com/repos/gama-platform/gama/labels/Concerns%20Data%20Persistence","name":"Concerns Data Persistence","color":"207de5","default":false},{"id":217363031,"node_id":"MDU6TGFiZWwyMTczNjMwMzE=","url":"https://api.github.com/repos/gama-platform/gama/labels/Concerns%20GAML","name":"Concerns GAML","color":"207de5","default":false},{"id":217361665,"node_id":"MDU6TGFiZWwyMTczNjE2NjU=","url":"https://api.github.com/repos/gama-platform/gama/labels/OS%20All","name":"OS All","color":"bfdadc","default":false},{"id":217469812,"node_id":"MDU6TGFiZWwyMTc0Njk4MTI=","url":"https://api.github.com/repos/gama-platform/gama/labels/Priority%20High","name":"Priority High","color":"e214df","default":false},{"id":217514639,"node_id":"MDU6TGFiZWwyMTc1MTQ2Mzk=","url":"https://api.github.com/repos/gama-platform/gama/labels/Version%20Git","name":"Version Git","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":{"login":"ptaillandier","id":1506077,"node_id":"MDQ6VXNlcjE1MDYwNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1506077?v=4","gravatar_id":"","url":"https://api.github.com/users/ptaillandier","html_url":"https://github.com/ptaillandier","followers_url":"https://api.github.com/users/ptaillandier/followers","following_url":"https://api.github.com/users/ptaillandier/following{/other_user}","gists_url":"https://api.github.com/users/ptaillandier/gists{/gist_id}","starred_url":"https://api.github.com/users/ptaillandier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptaillandier/subscriptions","organizations_url":"https://api.github.com/users/ptaillandier/orgs","repos_url":"https://api.github.com/users/ptaillandier/repos","events_url":"https://api.github.com/users/ptaillandier/events{/privacy}","received_events_url":"https://api.github.com/users/ptaillandier/received_events","type":"User","site_admin":false},"assignees":[{"login":"ptaillandier","id":1506077,"node_id":"MDQ6VXNlcjE1MDYwNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1506077?v=4","gravatar_id":"","url":"https://api.github.com/users/ptaillandier","html_url":"https://github.com/ptaillandier","followers_url":"https://api.github.com/users/ptaillandier/followers","following_url":"https://api.github.com/users/ptaillandier/following{/other_user}","gists_url":"https://api.github.com/users/ptaillandier/gists{/gist_id}","starred_url":"https://api.github.com/users/ptaillandier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptaillandier/subscriptions","organizations_url":"https://api.github.com/users/ptaillandier/orgs","repos_url":"https://api.github.com/users/ptaillandier/repos","events_url":"https://api.github.com/users/ptaillandier/events{/privacy}","received_events_url":"https://api.github.com/users/ptaillandier/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-07-24T17:47:29Z","updated_at":"2018-07-30T17:49:44Z","closed_at":"2018-07-26T15:57:24Z","author_association":"CONTRIBUTOR","body":"Hi,\r\nThere's been a little change (i don't know when) between Gama versions regarding string escaping.\r\n\r\nLet's test it with this example model : \r\n\r\n```\r\n/**\r\n* Name: StringEscapingIssue\r\n* Author: robin\r\n*/\r\n\r\nmodel stringEscapingIssue\r\n\r\nglobal {\r\n\tlist myList <- [0,1];\r\n\tgeometry myPolygon <- square(10);\r\n\tstring quotedList <- \"'\" + string(myList) + \"'\";\r\n\tstring quotedPolygon <- \"'\" + string(myPolygon) + \"'\";\r\n\t\r\n\treflex saveStrings {\r\n\t\tsave [myList, string(myList), quotedList, myPolygon, string(myPolygon),quotedPolygon]\r\n\t\tto: \"/home/robin/test.csv\" type: \"csv\" header: true rewrite: false;\r\n\t}\r\n}\r\n\r\nexperiment stringExperiment type: gui {\r\n}\r\n```\r\n\r\n- In **Gama 1.8 RC1**, here is the content of the test.csv file :\r\n```\r\nmyList,string(myList),quotedList,myPolygon,string(myPolygon),quotedPolygon\r\n[0,1],[0,1],\\'[0,1]\\',polygon ([{45.0,55.0,0.0},{55.0,55.0,0.0},{55.0,45.0,0.0},{45.0,45.0,0.0},{45.0,55.0,0.0}]),POLYGON ((45 55, 55 55, 55 45, 45 45, 45 55)),\\'POLYGON ((45 55, 55 55, 55 45, 45 45, 45 55))\\'\r\n\r\n```\r\n\r\n- And here is it in **Gama 1.7 (git commit 9484b484f0e07981670fcab6122209292c0c3f5a)**, here is the content of the test.csv file :\r\n```\r\nmyList,string(myList),quotedList,myPolygon,string(myPolygon),quotedPolygon\r\n[0,1],[0,1],'[0,1]',polygon ([{45.0,55.0,0.0},{55.0,55.0,0.0},{55.0,45.0,0.0},{45.0,45.0,0.0},{45.0,55.0,0.0}]),POLYGON ((45 55, 55 55, 55 45, 45 45, 45 55)),'POLYGON ((45 55, 55 55, 55 45, 45 45, 45 55))'\r\n```\r\n\r\nThe old behavior (unescaping the quotes) is way better, as the produced outputs can easily be loaded in any CSV reading tool.\r\nThe current behavior, escaping the quotes with this `\\` character is terrible for writing outputs, and I'm struggling to read the results of my model experiments.\r\n\r\nWould it be possible to propose an option, in the `save` statement, to unescape the strings outputted ?\r\n\r\n----\r\n\r\n*PS : Note that I'm using the `'` character to isolate strings because the usual `\"` has been escaped in the same way for a long time.*\r\n"},"comment":{"url":"https://api.github.com/repos/gama-platform/gama/issues/comments/408951559","html_url":"https://github.com/gama-platform/gama/issues/2475#issuecomment-408951559","issue_url":"https://api.github.com/repos/gama-platform/gama/issues/2475","id":408951559,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODk1MTU1OQ==","user":{"login":"RCura","id":807703,"node_id":"MDQ6VXNlcjgwNzcwMw==","avatar_url":"https://avatars0.githubusercontent.com/u/807703?v=4","gravatar_id":"","url":"https://api.github.com/users/RCura","html_url":"https://github.com/RCura","followers_url":"https://api.github.com/users/RCura/followers","following_url":"https://api.github.com/users/RCura/following{/other_user}","gists_url":"https://api.github.com/users/RCura/gists{/gist_id}","starred_url":"https://api.github.com/users/RCura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RCura/subscriptions","organizations_url":"https://api.github.com/users/RCura/orgs","repos_url":"https://api.github.com/users/RCura/repos","events_url":"https://api.github.com/users/RCura/events{/privacy}","received_events_url":"https://api.github.com/users/RCura/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T17:49:44Z","updated_at":"2018-07-30T17:49:44Z","author_association":"CONTRIBUTOR","body":"@AlexisDrogoul : Sorry to reopen this, but I have a new issue regarding the folder detection.\r\nIn my model, thousands of agents save their attributes to csv files.\r\nWith your modifications in `msi.gama.core/src/msi/gama/common/util/FileUtils.java`, I now have thousands of `Hit with EFS-based search:` messages in my standard output, flooding my terminal and blocking me from watching my okwn `write` statements.\r\n\r\nIs this change ([here](https://github.com/gama-platform/gama/blob/f767416bb75baa69e6081a3223ab3a14cadcdd07/msi.gama.core/src/msi/gama/common/util/FileUtils.java#L87) and [here]() I guess ) a debug oversight ? If not, would it be possible to add an option so that it doesn't get displayed to stdout each time a file is found ?"}}
{"actor":{"display_login":"RCura"}}