[wtr-general] Re: Dealing with the  character

2010-03-10 Thread George
I'm using IE. I tried using gsub!(/Â/, ), but I couldn't remove the
remaining spaces. It took a long time, but I think I figured it out
using this:

x = 3       Jubitz Travel Center              Â
Portland,OR
b = x.gsub(x[/(\d+)(\b[^0-9A-Za-z]{1,}\b)/], '') # gets rid of the
beginning number/funky chars
puts b.gsub(b[/(\b[^0-9A-Za-z]{1,}\b)(\w+)(,..)\Z/], '') # gets rid of
the second set of funky chars and city/state



On Mar 9, 3:36 pm, Ethan notet...@gmail.com wrote:
 Is this in IE or firefox?

-- 
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: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Dealing with the  character

2010-03-10 Thread orde
Nice that you got it worked out.

One question, though.

Open IE, go to the website you're testing, right click, and select
Encoding.  Is Unicode (UTF-8) selected?


On Mar 10, 8:26 am, George george.sand...@gmail.com wrote:
 I'm using IE. I tried using gsub!(/Â/, ), but I couldn't remove the
 remaining spaces. It took a long time, but I think I figured it out
 using this:

 x = 3       Jubitz Travel Center              Â
 Portland,OR
 b = x.gsub(x[/(\d+)(\b[^0-9A-Za-z]{1,}\b)/], '') # gets rid of the
 beginning number/funky chars
 puts b.gsub(b[/(\b[^0-9A-Za-z]{1,}\b)(\w+)(,..)\Z/], '') # gets rid of
 the second set of funky chars and city/state

 On Mar 9, 3:36 pm, Ethan notet...@gmail.com wrote:



  Is this in IE or firefox?

-- 
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: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Dealing with the  character

2010-03-10 Thread George
It appears that Western European (ISO) is selected by default. Is
there something I can do in the code to convert it to UTF-8?

On Mar 10, 9:44 am, orde ohil...@gmail.com wrote:
 Nice that you got it worked out.

 One question, though.

 Open IE, go to the website you're testing, right click, and select
 Encoding.  Is Unicode (UTF-8) selected?

 On Mar 10, 8:26 am, George george.sand...@gmail.com wrote:



  I'm using IE. I tried using gsub!(/Â/, ), but I couldn't remove the
  remaining spaces. It took a long time, but I think I figured it out
  using this:

  x = 3       Jubitz Travel Center              Â
  Portland,OR
  b = x.gsub(x[/(\d+)(\b[^0-9A-Za-z]{1,}\b)/], '') # gets rid of the
  beginning number/funky chars
  puts b.gsub(b[/(\b[^0-9A-Za-z]{1,}\b)(\w+)(,..)\Z/], '') # gets rid of
  the second set of funky chars and city/state

  On Mar 9, 3:36 pm, Ethan notet...@gmail.com wrote:

   Is this in IE or firefox?

-- 
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: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Dealing with the  character

2010-03-10 Thread orde
You should be able to select Unicode (UTF-8) from that dropdown.  That
might fix the  issue that you're observing.

On Mar 10, 10:04 am, George george.sand...@gmail.com wrote:
 It appears that Western European (ISO) is selected by default. Is
 there something I can do in the code to convert it to UTF-8?

 On Mar 10, 9:44 am, orde ohil...@gmail.com wrote:



  Nice that you got it worked out.

  One question, though.

  Open IE, go to the website you're testing, right click, and select
  Encoding.  Is Unicode (UTF-8) selected?

  On Mar 10, 8:26 am, George george.sand...@gmail.com wrote:

   I'm using IE. I tried using gsub!(/Â/, ), but I couldn't remove the
   remaining spaces. It took a long time, but I think I figured it out
   using this:

   x = 3       Jubitz Travel Center              Â
   Portland,OR
   b = x.gsub(x[/(\d+)(\b[^0-9A-Za-z]{1,}\b)/], '') # gets rid of the
   beginning number/funky chars
   puts b.gsub(b[/(\b[^0-9A-Za-z]{1,}\b)(\w+)(,..)\Z/], '') # gets rid of
   the second set of funky chars and city/state

   On Mar 9, 3:36 pm, Ethan notet...@gmail.com wrote:

Is this in IE or firefox?

-- 
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: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Dealing with the  character

2010-03-09 Thread orde
This will remove each  character from the string:

x = 3       Jubitz Travel Center              Â
Portland,OR
x.gsub!(/Â/, )

But you're probably looking to solve your root problem.  Looks like a
UTF-8 vs. ISO-8859-1 issue.  Do a search for utf-8 Â as a space on
your favorite search engine, and that should point you in the right
direction (hopefully).

Hope that helps.

orde


On Mar 9, 8:58 am, George george.sand...@gmail.com wrote:
 I'm not sure if this is a Watir or a Ruby question. I'm pulling all
 the contents from a select list, and when I display each option, I get
 something similar to the following (without the quotes):

 3       Jubitz Travel
 Center               Portland,OR

 Is there something in Watir that will get rid of the  character? Is
 this related to UTF-8? Ultimately, I'm trying to isolate Jubitz
 Travel Center from the text string. If someone can help, I would be
 most grateful!

 Thanks,

 George

-- 
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: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


Re: [wtr-general] Re: Dealing with the  character

2010-03-09 Thread Ethan
Is this in IE or firefox?

On Tue, Mar 9, 2010 at 12:57, orde ohil...@gmail.com wrote:

 This will remove each  character from the string:

 x = 3       Jubitz Travel Center              Â
 Portland,OR
 x.gsub!(/Â/, )

 But you're probably looking to solve your root problem.  Looks like a
 UTF-8 vs. ISO-8859-1 issue.  Do a search for utf-8 Â as a space on
 your favorite search engine, and that should point you in the right
 direction (hopefully).

 Hope that helps.

 orde


 On Mar 9, 8:58 am, George george.sand...@gmail.com wrote:
  I'm not sure if this is a Watir or a Ruby question. I'm pulling all
  the contents from a select list, and when I display each option, I get
  something similar to the following (without the quotes):
 
  3Â Â Â Â Â Â Â Jubitz Travel
  Center               Portland,OR
 
  Is there something in Watir that will get rid of the  character? Is
  this related to UTF-8? Ultimately, I'm trying to isolate Jubitz
  Travel Center from the text string. If someone can help, I would be
  most grateful!
 
  Thanks,
 
  George

 --
 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:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general


-- 
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: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general