Skip to content

Commit

Permalink
Revert "Fixing invalid byte sequence in UTF-8 in ruby 1.9.2"
Browse files Browse the repository at this point in the history
This reverts commit 6943b2f.
  • Loading branch information
liangzan committed Dec 14, 2012
1 parent 2d87cd5 commit f1fb84c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/contacts/hotmail.rb
Expand Up @@ -66,8 +66,7 @@ def contacts(options = {})
data.force_encoding('UTF-8')
separator = data[7]
unless data.valid_encoding?
data.force_encoding('iso-8859-1')
data = data.slice(2..-1).split("\x00").join('')
data = data.slice(2..-1).split("\u0000").join('')
separator = ','
end
@contacts = CSV.parse(data, {:headers => true, :col_sep => separator}).map do |row|
Expand Down

0 comments on commit f1fb84c

Please sign in to comment.