Hi Sebastjan,

What platform and Shoes are you using?

I downloaded your code (dup_app.rb) and replaced the following two lines.
Then it worked with Shoes 3 (0.r1514) on my Windows 7.

     open(file, "r") {|fin| data=fin.read() }
     open(file, "w:UTF-8")  { |fout| fout.write(data) } if data

ashbb