Invalid Byte Sequence in UTF-8 #48

Closed
opened 2011-08-03 21:10:15 +00:00 by devn · 3 comments
devn commented 2011-08-03 21:10:15 +00:00 (Migrated from github.com)
Override to_create if you need to prevent a call to #save!.
Rails restarted, pid 13301
Guard::JasmineHeadlessWebkit is running.
Guard::JasmineHeadlessWebkit running all specs...
invalid byte sequence in UTF-8
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:18:in `[]'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:18:in `block in get_spec_line_numbers'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:17:in `lines'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:17:in `each_with_index'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:17:in `each'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:17:in `get_spec_line_numbers'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:57:in `block in spec_file_line_numbers'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:55:in `collect'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:55:in `spec_file_line_numbers'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:15:in `block (2 levels) in write!'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:15:in `open'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:15:in `block in write!'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:14:in `each'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:14:in `write!'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/headless/runner.rb:65:in `run'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/headless/runner.rb:31:in `run'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/bundler/gems/guard-jasmine-headless-webkit-3fb7d8ac2483/lib/guard/jasmine-headless-webkit/runner.rb:11:in `run'
/Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/bundler/gems/guard-jasmine-headless-webkit-3fb7d8ac2483/lib/guard/jasmine-headless

I also had some trouble bundling, but that issue is gone now. If it pops up I'll submit another ticket. Thanks for taking a look!

``` Override to_create if you need to prevent a call to #save!. Rails restarted, pid 13301 Guard::JasmineHeadlessWebkit is running. Guard::JasmineHeadlessWebkit running all specs... invalid byte sequence in UTF-8 /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:18:in `[]' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:18:in `block in get_spec_line_numbers' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:17:in `lines' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:17:in `each_with_index' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:17:in `each' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:17:in `get_spec_line_numbers' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:57:in `block in spec_file_line_numbers' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:55:in `collect' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/files_list.rb:55:in `spec_file_line_numbers' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:15:in `block (2 levels) in write!' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:15:in `open' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:15:in `block in write!' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:14:in `each' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/template_writer.rb:14:in `write!' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/headless/runner.rb:65:in `run' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/gems/jasmine-headless-webkit-0.6.0/lib/jasmine/headless/runner.rb:31:in `run' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/bundler/gems/guard-jasmine-headless-webkit-3fb7d8ac2483/lib/guard/jasmine-headless-webkit/runner.rb:11:in `run' /Users/defn/.rvm/gems/ruby-1.9.2-p180@foo/bundler/gems/guard-jasmine-headless-webkit-3fb7d8ac2483/lib/guard/jasmine-headless ``` I also had some trouble bundling, but that issue is gone now. If it pops up I'll submit another ticket. Thanks for taking a look!
devn commented 2011-08-03 21:26:41 +00:00 (Migrated from github.com)

The offending line:

"PR.registerLangHandler(PR.createSimpleLexer([[\"com\",/^#[^\\n\\r]*/,null,\"#\"],[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \xC2\\xa0\"],[\"str\",/^\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,null,'\"']],[[\"kwd\",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\\s/,\n"
The offending line: ``` "PR.registerLangHandler(PR.createSimpleLexer([[\"com\",/^#[^\\n\\r]*/,null,\"#\"],[\"pln\",/^[\\t\\n\\r \\xa0]+/,null,\"\\t\\n\\r \xC2\\xa0\"],[\"str\",/^\"(?:[^\"\\\\]|\\\\[\\S\\s])*(?:\"|$)/,null,'\"']],[[\"kwd\",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\\s/,\n" ```
johnbintz commented 2011-08-04 14:24:34 +00:00 (Migrated from github.com)

That should hopefully fix it. It strips out bad UTF-8 via Iconv (http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/) so you may get weird backtrace results if you use UTF-8 in your spec descriptions, but, more importantly, the tests should actually run. :)

That should hopefully fix it. It strips out bad UTF-8 via Iconv (http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/) so you may get weird backtrace results if you use UTF-8 in your spec descriptions, but, more importantly, the tests should actually run. :)
mathias commented 2011-08-04 15:29:15 +00:00 (Migrated from github.com)

Cool, thank you!

Cool, thank you!
Sign in to join this conversation.
No Label
bug
doc
feature
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/jasmine-headless-webkit#48
No description provided.