From: Pen Ttt Date: 2010-04-16T12:20:45+09:00 Subject: how to use csv to open file in gbk code there is an file(/home/pt/test/shbase.csv) in gbk not utf-8,the following is my progrmm: require 'csv' CSV.open('/home/pt/test/shbase.csv', 'r') do |row| while line=row.gets puts line end end wrong message: /usr/local/ruby/lib/ruby/1.9.1/csv.rb:1988:in `=~': invalid byte sequence in UTF-8 (ArgumentError) how to open it use csv? -- Posted via http://www.ruby-forum.com/.