-----Messaggio originale-----
Da: Nik Z. [mailto:esperantoca / gmail.com] 
Inviato: gioved10 novembre 2011 23:55
A: ruby-talk ML
Oggetto: Re: Argument error --- How to solve?

--Try doing this and see if it helps with your substitution experience,
without getting too involved with Ruby's encoding mechanism


#coding:utf-8

## Do NOT delete the above utf-8 line, which ## you already have in your
original copy

temp=""
txtfile=File.open("8-3_tiedosto.txt","r")
txtfile.each{|row|temp=temp+row}
txtfile.close

tmp = temp.gsub(/[^A-Z0-9[:punct:]\s]+/ix, '')

puts tmp

PS--I left the numericals and all kinds of punctuational marks in there,
just in case if you have them in the original file--though there are
certainly not within your original range of ASCII 65..90 and 97..122

--
Posted via http://www.ruby-forum.com/.


 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Conto Arancio al 4,20%. Zero spese e massima liberta', aprilo in due minuti!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid922&d)-12