From: roob noob Date: 2012-06-10T00:15:43+09:00 Subject: file write is not the same file read, some encoding issue? I know I must be doing something wrong but I don't know what and I can't find a solution despite some searching. Here is the code File.open("#{RELATIVEPATH}/database.db", 'r') do |database| @database = database.read end File.open("#{RELATIVEPATH}/database2.db", 'w') do |test| test.puts @database end database and database2 have different md5sums so it was not a perfect copy. I think it must be some encoding difference between how Ruby interprets the information and how it is stored. The file is an SQLite database. How can I load it in such a way that it is an exact copy? -- Posted via http://www.ruby-forum.com/.