From: Thomas Bednarz Date: 2012-09-18T15:54:18+09:00 Subject: Re: Encoding question Hi Nathan, Thanks for your help. It is a bit a try and error thing! This worked for me: f = File.open("somefile.txt", "r:iso-8859-1:utf-8") f.each do |line| ... end In real live I will have to process files (CSV) that are uploaded from anywhere, produced by any system (Mac, Linux, Windows) using whatever software like different versions of Excel, OpenOffice Calc or extracts from databases... I don't know yet, how to determine the encoding of those uploaded files... Tom -- Posted via http://www.ruby-forum.com/.