On Thu, Jan 28, 2010 at 6:13 PM, Ryan S. [email protected]
convert the string to utf-8 encoding, message is complain the char is
totally no idea what need to do.
I had a sneaking suspicion that your task was Watir related.
First off the solution to this is hard - I have done some Watir tasks
processing international text (even in UTF-8) and there are some nasty
It is not Watir’s fault or anything, but there are 2 areas which really
puts ‘International text’ in the windows cmd shell is almost useless as
debugging the problem. Windows CMD shell takes perverse satisfaction in
any encoding you might have set your ruby code to work in. The platform
is what Windows does all its work in.
Watir itself is implemented on top of Win32OLE which is yet another area
the platform encoding can interfere against your wishes.
You might get better luck posting these questions on the watir mailing
Its been a
while for me, but useful workarounds to common and uncommon gotchas like
are discussed and answered there.
Also check the Watir wiki
its currently down for me).
Testing of encoded text did come up a lot when I checked it last, and
heavily document their
Lastly check out the JRuby equivalent to Watir: Celerity. It is API
compatible with Watir so your script will
probably still work with only minor modifications. It runs over a java
library so you have good encoding
processing if you need it, and more importantly there are less entry
for the Windows platform
encoding to impose itself. Note: Celerity has no visual component.
(FF) or ChromeWatir may
also be useful to you for similar reasons.