On Aug 19, 2005, at 2:21 PM, Karl von Laudermann wrote: > fn = ARGV[0] > count = 0 > > File.open(fn, "r") do |f| File.open(fn, "rb") do |f| > f.each_byte do |ch| > print "#{ch} " > count += 1 > end > end > > puts > puts "Count = #{count}" Try the above fix to open the file in "binary" mode, shutting off line-ending translation. James Edward Gray II