From: "Bartosz Dziewoński" Date: 2012-09-02T03:19:41+09:00 Subject: Re: Beginner Help - Encoding error exporting/writing to CSV 2012/9/1 Allan A. : > Bartosz Dziewoński wrote in post #1074162: >> All I can recomment now is to add .encode('utf-8') (or > >> .force_encoding('utf-8')) everywhere where you accept external input. > I've tried that and I must be doing something wrong because I keep > getting undefined method errors when I do Uh, that's certainly bad. Either you're not using Ruby 1.9 (that would be weird...), or the objects you are operating on are not the object you think they are (you should get information about the in the error message, e.g. "NoMethodError: undefined method `encode' for 5:Fixnum"). I skimmed the code, possible places where you are not setting the encoding are "files = CSV.read("files1.csv")" or "doc = Nokogiri::HTML(open(files[index][0]))". Also, this is a different code than the one that gives the error in first post (there is not line 77 in it). -- Matma Rex