Abinoam Jr. wrote in post #1135206:
> Dear Arup Rakshit,
>
> I have a (humble) guess about your problem...

> Try...
>     File.open('/home/kirti/workspace/Ruby/project_free/data/2013_diamonds.txt',
> external_encoding: Encoding::ISO_8859_1) do |file|

Very good suggestion indeed.

Just one topic in Ruby, always troubled me to understand the rationality 
about this encoding. When to think of `internal_encoding` and 
`external_encoding`. Why not only `encoding`? Sometimes in this 
situation I also used `force_encoding`.. This all I just used an an 
trial and error. No I didn't really aware of what I was doing. My goal 
was to fix the error. First try `encoding`, then try `force_encoding`...

Can you give me some lights on this topic ?

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