Thanks for your reply, This issue is really confused me, I need to finish 
the task in one week and the task is blocked by this issue. Because our 
team is a very old team, the automation scripts were written years ago, so 
the Ruby and Watir's version are too old.

Do you know the main reason? Could you give me some advice? 

Additional information: 
1. the XML is saved as "UTF-8" and the ruby file is saved as "ANSI" and the 
IE page charset is "UTF-8".
I cannot save the ruby file as "UTF-8". If it is saved as "UTF-8", I run 
the scripts, it will print the following errors:
auto.rb:1: Invalid char `\357' in expression
auto.rb:1: Invalid char `\273' in expression
auto.rb:1: Invalid char `\277' in expression

2. If I get the data from XML, and then I put the data in txt, then the 
double-byte char displayed correctly.

3. If I copy a double-byte char (such as: 问题) into the IE page, it also 
displayed correctly.

4. The method I used to get the data from XML is: str = 
Document.root.elements['string'].text
    The method I used to set the data to the IE page is: 
@ie.text_field(:id, 'question_box').set(str)

Looking forward to your reply. Thank you so much.


On Monday, June 11, 2012 3:34:59 PM UTC+8, Željko Filipin wrote:
>
> On Mon, Jun 11, 2012 at 3:28 AM, [email protected] <[email protected]> 
> wrote:
> > I'm using watir 1.8.6 and ruby 1.5.2.
>
> Why are you using so old versions of Ruby and Watir? The current version 
> or Ruby is 1.9.3 and Watir 3.0.
>
> Željko
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to