Skip to content

Instantly share code, notes, and snippets.

@sinegar
Last active August 29, 2015 13:56
Show Gist options
  • Save sinegar/9269563 to your computer and use it in GitHub Desktop.
Save sinegar/9269563 to your computer and use it in GitHub Desktop.
BBEF CVS import issue
require "test/unit"
require "csv"
class TestCsv < Test::Unit::TestCase
def test_default_utf
csv = "sponsors.csv"
CSV.foreach(csv, :encoding => 'windows-1251:utf-8') do |row|
print row
end
CSV.foreach(csv) do |row|
print row
end
end
end
SponsorFirstName SponsorLastName ID Organisation SponsorType Address City State Zip Country CurrentBal$ DatePaid ContactMethod EmailAddress PhNo Mobile
D 555555 D Family Sponsor Attn: John Doe Makati City Philippines $45 21/11/12 Email d.d@example.comÊ 1111111712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment