From: Ar Ik Date: 2011-11-10T05:35:54+09:00 Subject: Argument error --- How to solve? I´m at the very beginning with Ruby and give again and again this error program.rb:6:in `gsub': broken utf-8 string (argumenterror) when I'm trying this short code: #coding:utf-8 temp="" txtfile=File.open("8-3_tiedosto.txt","r");txtfile.each{|row|temp=temp+row};txtfile.close temp = temp.gsub("Å", '') puts temp The original text in the file contains characters that I do not to include to my final result, that should only contain ASCII 65..90 and 97..122. So I do not understand, what arguments should be given to gsub? I'm sorry because of my stupidity :) -- Posted via http://www.ruby-forum.com/.