{"action":"created","issue":{"url":"https://api.github.com/repos/ruby-rdf/rdf-turtle/issues/13","labels_url":"https://api.github.com/repos/ruby-rdf/rdf-turtle/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/ruby-rdf/rdf-turtle/issues/13/comments","events_url":"https://api.github.com/repos/ruby-rdf/rdf-turtle/issues/13/events","html_url":"https://github.com/ruby-rdf/rdf-turtle/issues/13","id":108709107,"number":13,"title":"Encoding error when upgrading from 1.1.7 to 1.1.8","user":{"login":"jcoyne","id":92044,"avatar_url":"https://avatars.githubusercontent.com/u/92044?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoyne","html_url":"https://github.com/jcoyne","followers_url":"https://api.github.com/users/jcoyne/followers","following_url":"https://api.github.com/users/jcoyne/following{/other_user}","gists_url":"https://api.github.com/users/jcoyne/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoyne/subscriptions","organizations_url":"https://api.github.com/users/jcoyne/orgs","repos_url":"https://api.github.com/users/jcoyne/repos","events_url":"https://api.github.com/users/jcoyne/events{/privacy}","received_events_url":"https://api.github.com/users/jcoyne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-28T17:43:36Z","updated_at":"2015-09-28T21:39:30Z","closed_at":null,"body":"```\r\n    Encoding::CompatibilityError:\r\n       incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ebnf-0.3.9/lib/ebnf/ll1/scanner.rb:96:in `scan'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ebnf-0.3.9/lib/ebnf/ll1/scanner.rb:96:in `scan'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ebnf-0.3.9/lib/ebnf/ll1/lexer.rb:264:in `block in match_token'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ebnf-0.3.9/lib/ebnf/ll1/lexer.rb:262:in `each'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ebnf-0.3.9/lib/ebnf/ll1/lexer.rb:262:in `match_token'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ebnf-0.3.9/lib/ebnf/ll1/lexer.rb:224:in `recover'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rdf-turtle-1.1.8/lib/rdf/turtle/reader.rb:519:in `rescue in prod'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rdf-turtle-1.1.8/lib/rdf/turtle/reader.rb:557:in `prod'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rdf-turtle-1.1.8/lib/rdf/turtle/reader.rb:258:in `read_statement'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rdf-turtle-1.1.8/lib/rdf/turtle/reader.rb:145:in `each_statement'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ldp-0.4.0/lib/ldp/resource/rdf_source.rb:59:in `response_as_graph'\r\n     # /Users/justin/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/ldp-0.4.0/lib/ldp/resource/rdf_source.rb:31:in `graph'\r\n```"},"comment":{"url":"https://api.github.com/repos/ruby-rdf/rdf-turtle/issues/comments/143881834","html_url":"https://github.com/ruby-rdf/rdf-turtle/issues/13#issuecomment-143881834","issue_url":"https://api.github.com/repos/ruby-rdf/rdf-turtle/issues/13","id":143881834,"user":{"login":"gkellogg","id":46296,"avatar_url":"https://avatars.githubusercontent.com/u/46296?v=3","gravatar_id":"","url":"https://api.github.com/users/gkellogg","html_url":"https://github.com/gkellogg","followers_url":"https://api.github.com/users/gkellogg/followers","following_url":"https://api.github.com/users/gkellogg/following{/other_user}","gists_url":"https://api.github.com/users/gkellogg/gists{/gist_id}","starred_url":"https://api.github.com/users/gkellogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkellogg/subscriptions","organizations_url":"https://api.github.com/users/gkellogg/orgs","repos_url":"https://api.github.com/users/gkellogg/repos","events_url":"https://api.github.com/users/gkellogg/events{/privacy}","received_events_url":"https://api.github.com/users/gkellogg/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T21:39:30Z","updated_at":"2015-09-28T21:39:30Z","body":"Hard to see how a change in that commit would have made a difference. Both old and new parser use `EBNF::LL1::Lexer`, which in turn uses `EBNF::LL1::Scanner`. The scanner encodes everything to UTF8, using `force_encoding(Encoding::UTF_8)`. The location of the error indicates that this data in the scan buffer wasn't in UTF8, which is odd, since it's always encoded when adding to the buffer.\r\n\r\nCan you provide me with an example illustrating the problem?"}}