Watir 1.6.5, ruby 1.8.7 and character encoding problem

Hi,
I was updating my tests to work for watir 1.6.5 and ruby 1.8.7 since I
had them before on watir 1.5.3 and ruby 1.8.6.
Since then when I try to set a text field on any web page the characters
don't correspond to the original ones and that was working perfectly
before.
The code I was using was:

require 'watir'
@nav=Watir::Browser.new()
@nav.goto("www.google.com")
txt="ñÑáéíóú"
@nav.text_field(:name,"q").set txt
@nav.close()

Instead of writing the characters "ñÑáéíóú" what it is written is
�������

Any idea on how to solve this?

Thanks a lot.

···

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

I think I found the solution on
http://osdir.com/ml/watir-general/2010-03/msg00098.html

I solved it commenting the line WIN32OLE.codepage = WIN32OLE::CP_UTF8 on
win32ole.rb file

···

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

Further info:
http://groups.google.com/group/watir-general/browse_thread/thread/ef89755cb627c80c

···

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

Now I'm trying the same thing for firefox or watir-wedbriver and the
same problem there, no idea how to solve it
for example try this and you will see that the result is not with the
correct characters:

    require 'watir-webdriver'
    nav=Watir::Browser.new(:firefox)
    nav.goto("www.google.is")
    puts nav.text

···

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