I'm having similar problems working with double byte unicode, like
Japanese and yes, I'm certain the problem is with the jssh extension -
unfortunately, I don't know of any real solution and given that jssh
is abandonware, it's very hard to get any help with it on any
platform. Unicode works for me when it comes to getting values from
the browser, e.g doing this on button with a Japanese value, will

@browser.button(:id, "btn_back").value.should == JapaneseString # I
have to load the string from an Excel sheet though to avoid problems,
so the assertion checks against a variable or constant that is loading
the string content from within the Excel file...

But setting a text_field with unicode, like:

@browser.text_field(:id, "whatever").set(JapaneseString) # again
loading the unicode string from Excel...

results in garbage characters... The "value" method does not work

@browser.text_field(:id, "whatever").value = JapaneseString

I'm not sure jssh can even be compiled with proper unicode support,
but I just don't know enough about it to be able to try on my own...
Sorry I didn't have any real solution for you...



On May 1, 12:54 am, Stacia <baka...@gmail.com> wrote:
> I've been working all day to try to get unicode displayed in text
> fields properly. I've come to the conclusion that probably the JSSH
> socket connection doesn't support having unicode sent over it - is
> there anyone who can confirm this? I saw a fix for Chinese, but this
> was for IE, and other fixes involved ugliness like using Excel. Every
> time I try to send unicode data (encoded in various ways with
> different libraries) the output is always junk. Would building Firefox
> with JSSH support built in help at all?  (not that it's an easy option
> on windows, but still). I was trying to experiment with JSSH myself
> using my own telnet client, but I couldn't find a unicode friendly
> telnet client at all (not a good sign). I've tried everything: I
> changed the default encoding of Firefox to utf8, I tried nkf, iconv,
> and packing arrays of ints into unicode chars. All of these just
> output junk (although the last method I could write to text files
> fine) I've learned a lot about unicode in *Ruby* but if the problem is
> unicode over JSSH that's beyond me.
> I also have rewritten the doKeyPressMethod for quite a while now, it
> looks like this:
> class FireWatir::TextField
>   def doKeyPress( value )
>     @o.value = value
>     fire_key_events
>   end
> end
> this solves the slow text input problem on linux. I don't care about
> inputting the text character by character, which may have caused an
> issue with the unicode. I tried just putting in some unicode at that
> low level by setting @o.value to a unicode value directly (not sure
> how to get even lower level at the JSSH level) and that didn't help.
> Please, if I could just get a simple yes or no about whether this is
> even possible over JSSH, that would help a lot, thanks
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to