Hi Greg, Put this ( # encoding: utf-8) on at the top of your code and it should work and go to the correct web page:
# encoding: utf-8 @agent = Watir::Browser.new(:firefox) @agent.goto url Regards On Wed, Sep 24, 2014 at 5:35 AM, Greg Allen <[email protected]> wrote: > I am trying to load a web page using Watir: > > @agent = Watir::Browser.new(:firefox) > @agent.goto url > > The web page I am going to contains the euro symbol in strings like this: > € 1.038,00 > > If I pull up the page in FireFox and do a view source, I can see the text > fine. > > However, when I print out the HTML in ruby, or access the text of an > element, I get this: € 1.038,00 > > I have confirmed that the encoding for the browser and for the strings > appears to be UTF-8. > > I am even running my test on windows and can see FireFox starting up and > going to the page, which displays the euro symbol correctly. But again, > when I try to access any of these fields in ruby the euro symbol seems to > be wrong. > > Can somebody tell me what is going on? > > Thanks, > > -- Greg > > > > -- > -- > 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] > > --- > You received this message because you are subscribed to the Google Groups > "Watir General" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- 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] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
