Skip to content

Commit

Permalink
Add "encoding: utf8" comment in order to suppress encoding error message
Browse files Browse the repository at this point in the history
This error message was being generated in Rubies 1.9.2, 1.9.3, and 2.0.0.

    test_ical_1(TestVcard): ArgumentError: invalid byte sequence in US-ASCII
    /Users/h2s/src/vpim/lib/vpim/rfc2425.rb:92:in `block in unfold'
    /Users/h2s/src/vpim/lib/vpim/rfc2425.rb:88:in `each_line'
    /Users/h2s/src/vpim/lib/vpim/rfc2425.rb:88:in `unfold'
    /Users/h2s/src/vpim/lib/vpim/rfc2425.rb:315:in `decode'
    test/test_vcard.rb:351:in `block in test_ical_1'

Adding a "#encoding: utf8" comment to the top of all the source code files using
the magic_encoding gem fixes the error. This now leaves only the invalid
multibyte encoding error to deal with.
  • Loading branch information
henrycatalinismith committed Aug 5, 2013
1 parent 72c74a3 commit f6966ef
Show file tree
Hide file tree
Showing 46 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/vpim.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/address.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/agent/atomize.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2009 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/agent/base.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2009 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/agent/calendars.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/agent/handler.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2009 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/agent/ics.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2009 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/attachment.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/date.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/dirinfo.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/duration.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/enumerator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/icalendar.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/maker/vcard.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/property/base.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/property/common.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/property/location.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/property/priority.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/property/recurrence.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/property/resources.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/repo.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/rfc2425.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/rrule.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/time.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/vcard.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/vevent.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/view.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/vjournal.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/vpim.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions lib/vpim/vtodo.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
=begin
Copyright (C) 2008 Sam Roberts
Expand Down
1 change: 1 addition & 0 deletions test/common.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
require 'test/unit'
require 'pp'

Expand Down
1 change: 1 addition & 0 deletions test/test_agent_atomize.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
require 'test/common'

require 'vpim/agent/atomize'
Expand Down
1 change: 1 addition & 0 deletions test/test_agent_calendars.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'vpim/repo'
Expand Down
1 change: 1 addition & 0 deletions test/test_agent_ics.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
require 'test/common'
require 'sinatra/test'
require 'vpim/agent/ics'
Expand Down
1 change: 1 addition & 0 deletions test/test_all.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'pp'
Expand Down
1 change: 1 addition & 0 deletions test/test_date.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'vpim/date'
Expand Down
1 change: 1 addition & 0 deletions test/test_dur.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'vpim/duration'
Expand Down
1 change: 1 addition & 0 deletions test/test_field.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'test/unit'
Expand Down
1 change: 1 addition & 0 deletions test/test_ical.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'vpim/icalendar'
Expand Down
1 change: 1 addition & 0 deletions test/test_misc.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'test/unit'
Expand Down
1 change: 1 addition & 0 deletions test/test_repo.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'vpim/repo'
Expand Down
1 change: 1 addition & 0 deletions test/test_rrule.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

ENV['TZ'] = 'EST5EDT'
Expand Down
1 change: 1 addition & 0 deletions test/test_vcard.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'vpim/vcard'
Expand Down
1 change: 1 addition & 0 deletions test/test_view.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby

require 'test/unit'
Expand Down

0 comments on commit f6966ef

Please sign in to comment.