Paul Carvalho
Fri, 23 Feb 2007 07:40:57 -0800
I was able to input extended Ascii characters into text fields but I didn't do it this way. I should clarify that they were accented European characters, not CJK. I have a Watir script that sets up the base test data in the system. It reads the inputs from an Excel file into an Array and then I use the array data to populate the text fields. I'm just looking at the data now.. it looks fine to me. I didn't use any special 'require' lines or KCodes. I just let Excel worry about holding the data I wanted and assumed the ruby array would hold and use the data I gave it.. which it did. Sorry if this solution doesn't work for you. It worked for me. You asked if anyone had gotten it to work. Apparently I have by not trying to directly input the special characters. Is that a limitation of the 'set' method? Dunno. Good luck! Cheers. Paul C. On 23/02/07, Željko Filipin <[EMAIL PROTECTED]> wrote:
I want to set text field to "željko".
ie.text_field(:index, 1).set("željko")
But, Watir sets it to "§eljko", "Ĺľeljko" or just "eljko" or some other
string (depending if I try from irb, or file that is saved in different
encodings).
I have saved file as utf-8 and this to the top added
require "win32ole"
WIN32OLE.codepage = WIN32OLE::CP_UTF8
I have tried
ie.text_field(:index,1).value=("željko")
I have tried adding this to the top of the file.
$KCODE = 'utf8'
require 'jcode'
I am reading threads from this list and searching Internet for utf-8 and
Ruby, but no luck for now. I just wonder if anybody has solved this?
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
- [Wtr-general] TextField#set and utf-8 Željko Filipin
Re: [Wtr-general] TextField#set and utf-8 Paul Carvalho
- Re: [Wtr-general] TextField#set and utf-8 Željko Filipin
- Re: [Wtr-general] TextField#set and utf-8 Željko Filipin
- Re: [Wtr-general] TextField#set and utf-8 Bret Pettichord
- Re: [Wtr-general] TextField#set and utf-8 Željko Filipin