Hi All, I tried everything and was going mad. I discovered redownloading the file and replacing my existing one fixed it after putting the utf header in. My guess is editing the file on windows somehow stuffed up the encoding (surprise surprise!). Thank you everyone for their help! -M On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote:
> Hi People, > > Im running the seed.rd for the countries from here: > https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads > the > author states that the file is UTF. > > When I execute the import I recieve the error: invalid multibyte char > (UTF-8)' (from instructions here: > http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9 > ) > > I tried adding this to the top of the file: # encoding: utf-8 but still no > luck. > > I tried the instructions here: > https://groups.google.com/forum/?fromgroups#!searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J > > Still the same error occours. > > Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: > 3.1.3 running on windows. > > Any ideas what I have wrong? > Thanks, > Maxus > > On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote: > > Hi People, > > Im running the seed.rd for the countries from here: > https://github.com/wdblair/Rails-Seed-All-Countries-and-All-States/downloads > the > author states that the file is UTF. > > When I execute the import I recieve the error: invalid multibyte char > (UTF-8)' (from instructions here: > http://stackoverflow.com/questions/1739836/invalid-multibyte-char-us-ascii-with-rails-and-ruby-1-9 > ) > > I tried adding this to the top of the file: # encoding: utf-8 but still no > luck. > > I tried the instructions here: > https://groups.google.com/forum/?fromgroups#!searchin/rubyonrails-talk/invalid$20multibyte$20char/rubyonrails-talk/KKXeimNmjV4/B5qfG9trqW8J > > Still the same error occours. > > Im using ruby: 1.9.2p290 (2011-07-09) [i386-mingw32] and rails: > 3.1.3 running on windows. > > Any ideas what I have wrong? > Thanks, > Maxus > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/O0AomlaGsXwJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

