{"action":"created","comment":{"url":"https://api.github.com/repos/box/spout/pulls/comments/57215567","id":57215567,"diff_hunk":"@@ -147,24 +143,39 @@ public function next()\n     }\n \n     /**\n-     * Returns the next line, converted if necessary to UTF-8.\n-     * Neither fgets nor fgetcsv don't work with non UTF-8 data... so we need to do some things manually.\n+     * Returns the next row, converted if necessary to UTF-8.\n+     * As fgetcsv() does not manage correctly encoding for non UTF-8 data,\n+     * we remove manually whitespace with ltrim or rtrim (depending on the order of the bytes)\n      *\n-     * @return string|false The next line for the current file pointer, encoded in UTF-8 or FALSE if nothing to read\n+     * @return array|false The row for the current file pointer, encoded in UTF-8 or FALSE if nothing to read\n      * @throws \\Box\\Spout\\Common\\Exception\\EncodingConversionException If unable to convert data to UTF-8\n      */\n-    protected function getNextUTF8EncodedLine()\n+    protected function getNextUTF8EncodedRow()\n     {\n-        // Read until the EOL delimiter or EOF is reached. The delimiter's encoding needs to match the CSV's encoding.\n-        $encodedEOLDelimiter = $this->getEncodedEOLDelimiter();\n-        $encodedLineData = $this->globalFunctionsHelper->stream_get_line($this->filePointer, self::MAX_READ_BYTES_PER_LINE, $encodedEOLDelimiter);\n+        $encodedLineData = fgetcsv($this->filePointer, self::MAX_READ_BYTES_PER_LINE, $this->fieldDelimiter, $this->fieldEnclosure);","path":"src/Spout/Reader/CSV/RowIterator.php","position":50,"original_position":50,"commit_id":"e85c5b61fc088b4801cdd9d04499d0b34f8e22f0","original_commit_id":"e85c5b61fc088b4801cdd9d04499d0b34f8e22f0","user":{"login":"adrilo","id":7086917,"avatar_url":"https://avatars.githubusercontent.com/u/7086917?v=3","gravatar_id":"","url":"https://api.github.com/users/adrilo","html_url":"https://github.com/adrilo","followers_url":"https://api.github.com/users/adrilo/followers","following_url":"https://api.github.com/users/adrilo/following{/other_user}","gists_url":"https://api.github.com/users/adrilo/gists{/gist_id}","starred_url":"https://api.github.com/users/adrilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrilo/subscriptions","organizations_url":"https://api.github.com/users/adrilo/orgs","repos_url":"https://api.github.com/users/adrilo/repos","events_url":"https://api.github.com/users/adrilo/events{/privacy}","received_events_url":"https://api.github.com/users/adrilo/received_events","type":"User","site_admin":false},"body":"Sorry, one more thing: $encodedLineData => $encodedRowData","created_at":"2016-03-23T18:47:11Z","updated_at":"2016-03-23T18:47:11Z","html_url":"https://github.com/box/spout/pull/187#discussion_r57215567","pull_request_url":"https://api.github.com/repos/box/spout/pulls/187","_links":{"self":{"href":"https://api.github.com/repos/box/spout/pulls/comments/57215567"},"html":{"href":"https://github.com/box/spout/pull/187#discussion_r57215567"},"pull_request":{"href":"https://api.github.com/repos/box/spout/pulls/187"}}},"pull_request":{"url":"https://api.github.com/repos/box/spout/pulls/187","id":62929296,"html_url":"https://github.com/box/spout/pull/187","diff_url":"https://github.com/box/spout/pull/187.diff","patch_url":"https://github.com/box/spout/pull/187.patch","issue_url":"https://api.github.com/repos/box/spout/issues/187","number":187,"state":"open","locked":false,"title":"Fix line breaks on CSV reader","user":{"login":"skeleton","id":1131230,"avatar_url":"https://avatars.githubusercontent.com/u/1131230?v=3","gravatar_id":"","url":"https://api.github.com/users/skeleton","html_url":"https://github.com/skeleton","followers_url":"https://api.github.com/users/skeleton/followers","following_url":"https://api.github.com/users/skeleton/following{/other_user}","gists_url":"https://api.github.com/users/skeleton/gists{/gist_id}","starred_url":"https://api.github.com/users/skeleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeleton/subscriptions","organizations_url":"https://api.github.com/users/skeleton/orgs","repos_url":"https://api.github.com/users/skeleton/repos","events_url":"https://api.github.com/users/skeleton/events{/privacy}","received_events_url":"https://api.github.com/users/skeleton/received_events","type":"User","site_admin":false},"body":"Fix CSV reader to allow line breaks in CSV files.\r\n\r\nThe only way founded is to use `fgetcsv()` and fix manually the problem with non UTF-8 data.\r\nIf principle is validated, I will remove useless property `endOfLineCharacter` because with fgetcsv(), we cannot define end of line parameter. \r\n\r\nrelated issue: #183 ","created_at":"2016-03-15T15:53:56Z","updated_at":"2016-03-23T18:47:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66a8fd53481ce0bfb0a9c4e08a7984d264ec30a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/box/spout/pulls/187/commits","review_comments_url":"https://api.github.com/repos/box/spout/pulls/187/comments","review_comment_url":"https://api.github.com/repos/box/spout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/box/spout/issues/187/comments","statuses_url":"https://api.github.com/repos/box/spout/statuses/e85c5b61fc088b4801cdd9d04499d0b34f8e22f0","head":{"label":"skeleton:issue-183","ref":"issue-183","sha":"e85c5b61fc088b4801cdd9d04499d0b34f8e22f0","user":{"login":"skeleton","id":1131230,"avatar_url":"https://avatars.githubusercontent.com/u/1131230?v=3","gravatar_id":"","url":"https://api.github.com/users/skeleton","html_url":"https://github.com/skeleton","followers_url":"https://api.github.com/users/skeleton/followers","following_url":"https://api.github.com/users/skeleton/following{/other_user}","gists_url":"https://api.github.com/users/skeleton/gists{/gist_id}","starred_url":"https://api.github.com/users/skeleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeleton/subscriptions","organizations_url":"https://api.github.com/users/skeleton/orgs","repos_url":"https://api.github.com/users/skeleton/repos","events_url":"https://api.github.com/users/skeleton/events{/privacy}","received_events_url":"https://api.github.com/users/skeleton/received_events","type":"User","site_admin":false},"repo":{"id":53946055,"name":"spout","full_name":"skeleton/spout","owner":{"login":"skeleton","id":1131230,"avatar_url":"https://avatars.githubusercontent.com/u/1131230?v=3","gravatar_id":"","url":"https://api.github.com/users/skeleton","html_url":"https://github.com/skeleton","followers_url":"https://api.github.com/users/skeleton/followers","following_url":"https://api.github.com/users/skeleton/following{/other_user}","gists_url":"https://api.github.com/users/skeleton/gists{/gist_id}","starred_url":"https://api.github.com/users/skeleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeleton/subscriptions","organizations_url":"https://api.github.com/users/skeleton/orgs","repos_url":"https://api.github.com/users/skeleton/repos","events_url":"https://api.github.com/users/skeleton/events{/privacy}","received_events_url":"https://api.github.com/users/skeleton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skeleton/spout","description":"Read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way","fork":true,"url":"https://api.github.com/repos/skeleton/spout","forks_url":"https://api.github.com/repos/skeleton/spout/forks","keys_url":"https://api.github.com/repos/skeleton/spout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skeleton/spout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skeleton/spout/teams","hooks_url":"https://api.github.com/repos/skeleton/spout/hooks","issue_events_url":"https://api.github.com/repos/skeleton/spout/issues/events{/number}","events_url":"https://api.github.com/repos/skeleton/spout/events","assignees_url":"https://api.github.com/repos/skeleton/spout/assignees{/user}","branches_url":"https://api.github.com/repos/skeleton/spout/branches{/branch}","tags_url":"https://api.github.com/repos/skeleton/spout/tags","blobs_url":"https://api.github.com/repos/skeleton/spout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skeleton/spout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skeleton/spout/git/refs{/sha}","trees_url":"https://api.github.com/repos/skeleton/spout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skeleton/spout/statuses/{sha}","languages_url":"https://api.github.com/repos/skeleton/spout/languages","stargazers_url":"https://api.github.com/repos/skeleton/spout/stargazers","contributors_url":"https://api.github.com/repos/skeleton/spout/contributors","subscribers_url":"https://api.github.com/repos/skeleton/spout/subscribers","subscription_url":"https://api.github.com/repos/skeleton/spout/subscription","commits_url":"https://api.github.com/repos/skeleton/spout/commits{/sha}","git_commits_url":"https://api.github.com/repos/skeleton/spout/git/commits{/sha}","comments_url":"https://api.github.com/repos/skeleton/spout/comments{/number}","issue_comment_url":"https://api.github.com/repos/skeleton/spout/issues/comments{/number}","contents_url":"https://api.github.com/repos/skeleton/spout/contents/{+path}","compare_url":"https://api.github.com/repos/skeleton/spout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skeleton/spout/merges","archive_url":"https://api.github.com/repos/skeleton/spout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skeleton/spout/downloads","issues_url":"https://api.github.com/repos/skeleton/spout/issues{/number}","pulls_url":"https://api.github.com/repos/skeleton/spout/pulls{/number}","milestones_url":"https://api.github.com/repos/skeleton/spout/milestones{/number}","notifications_url":"https://api.github.com/repos/skeleton/spout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skeleton/spout/labels{/name}","releases_url":"https://api.github.com/repos/skeleton/spout/releases{/id}","deployments_url":"https://api.github.com/repos/skeleton/spout/deployments","created_at":"2016-03-15T13:18:25Z","updated_at":"2016-03-15T13:18:26Z","pushed_at":"2016-03-23T17:54:22Z","git_url":"git://github.com/skeleton/spout.git","ssh_url":"git@github.com:skeleton/spout.git","clone_url":"https://github.com/skeleton/spout.git","svn_url":"https://github.com/skeleton/spout","homepage":"","size":7878,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"box:master","ref":"master","sha":"e321f30c3bc207be81d7e2da4ebbbb69a3ca79f9","user":{"login":"box","id":23900,"avatar_url":"https://avatars.githubusercontent.com/u/23900?v=3","gravatar_id":"","url":"https://api.github.com/users/box","html_url":"https://github.com/box","followers_url":"https://api.github.com/users/box/followers","following_url":"https://api.github.com/users/box/following{/other_user}","gists_url":"https://api.github.com/users/box/gists{/gist_id}","starred_url":"https://api.github.com/users/box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/box/subscriptions","organizations_url":"https://api.github.com/users/box/orgs","repos_url":"https://api.github.com/users/box/repos","events_url":"https://api.github.com/users/box/events{/privacy}","received_events_url":"https://api.github.com/users/box/received_events","type":"Organization","site_admin":false},"repo":{"id":29219291,"name":"spout","full_name":"box/spout","owner":{"login":"box","id":23900,"avatar_url":"https://avatars.githubusercontent.com/u/23900?v=3","gravatar_id":"","url":"https://api.github.com/users/box","html_url":"https://github.com/box","followers_url":"https://api.github.com/users/box/followers","following_url":"https://api.github.com/users/box/following{/other_user}","gists_url":"https://api.github.com/users/box/gists{/gist_id}","starred_url":"https://api.github.com/users/box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/box/subscriptions","organizations_url":"https://api.github.com/users/box/orgs","repos_url":"https://api.github.com/users/box/repos","events_url":"https://api.github.com/users/box/events{/privacy}","received_events_url":"https://api.github.com/users/box/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/box/spout","description":"Read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way","fork":false,"url":"https://api.github.com/repos/box/spout","forks_url":"https://api.github.com/repos/box/spout/forks","keys_url":"https://api.github.com/repos/box/spout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/box/spout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/box/spout/teams","hooks_url":"https://api.github.com/repos/box/spout/hooks","issue_events_url":"https://api.github.com/repos/box/spout/issues/events{/number}","events_url":"https://api.github.com/repos/box/spout/events","assignees_url":"https://api.github.com/repos/box/spout/assignees{/user}","branches_url":"https://api.github.com/repos/box/spout/branches{/branch}","tags_url":"https://api.github.com/repos/box/spout/tags","blobs_url":"https://api.github.com/repos/box/spout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/box/spout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/box/spout/git/refs{/sha}","trees_url":"https://api.github.com/repos/box/spout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/box/spout/statuses/{sha}","languages_url":"https://api.github.com/repos/box/spout/languages","stargazers_url":"https://api.github.com/repos/box/spout/stargazers","contributors_url":"https://api.github.com/repos/box/spout/contributors","subscribers_url":"https://api.github.com/repos/box/spout/subscribers","subscription_url":"https://api.github.com/repos/box/spout/subscription","commits_url":"https://api.github.com/repos/box/spout/commits{/sha}","git_commits_url":"https://api.github.com/repos/box/spout/git/commits{/sha}","comments_url":"https://api.github.com/repos/box/spout/comments{/number}","issue_comment_url":"https://api.github.com/repos/box/spout/issues/comments{/number}","contents_url":"https://api.github.com/repos/box/spout/contents/{+path}","compare_url":"https://api.github.com/repos/box/spout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/box/spout/merges","archive_url":"https://api.github.com/repos/box/spout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/box/spout/downloads","issues_url":"https://api.github.com/repos/box/spout/issues{/number}","pulls_url":"https://api.github.com/repos/box/spout/pulls{/number}","milestones_url":"https://api.github.com/repos/box/spout/milestones{/number}","notifications_url":"https://api.github.com/repos/box/spout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/box/spout/labels{/name}","releases_url":"https://api.github.com/repos/box/spout/releases{/id}","deployments_url":"https://api.github.com/repos/box/spout/deployments","created_at":"2015-01-14T00:36:25Z","updated_at":"2016-03-23T15:44:35Z","pushed_at":"2016-03-23T17:54:22Z","git_url":"git://github.com/box/spout.git","ssh_url":"git@github.com:box/spout.git","clone_url":"https://github.com/box/spout.git","svn_url":"https://github.com/box/spout","homepage":"","size":25786,"stargazers_count":549,"watchers_count":549,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":9,"forks":56,"open_issues":9,"watchers":549,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/box/spout/pulls/187"},"html":{"href":"https://github.com/box/spout/pull/187"},"issue":{"href":"https://api.github.com/repos/box/spout/issues/187"},"comments":{"href":"https://api.github.com/repos/box/spout/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/box/spout/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/box/spout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/box/spout/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/box/spout/statuses/e85c5b61fc088b4801cdd9d04499d0b34f8e22f0"}}}}