From: Pen Ttt Date: 2010-04-13T09:09:29+09:00 Subject: Re: how to open dbf file with ruby? hi ,here is my programm: require 'iconv' require 'dbf' table = DBF::Table.new("/home/pt/test/shbase.dbf") table.each do |record| print Iconv.iconv('UTF-8','GBK',record.stock_name),",",record.stock_code,"\n" end the output is: ["工商银行"],601398 ["吉林高速"],601518 ["北辰实业"],601588 ["中国铝业"],601600 ["中国太保"],601601 ["上海医药"],601607 what i want to get is: 工商银行,601398 吉林高速,601518 北辰实业,601588 中国铝业,601600 中国太保,601601 上海医药,601607 how can i get it? -- Posted via http://www.ruby-forum.com/.