Looking for a bit of help here.

I have a select list that has the following value 'Nome do serviço'. 

When I do select_list(whatever).text i get back 'Nome do servi\347o'

if i look in the source of the html i get 'Nome do serviço'

I also found code to convert 'Nome do serviço' to 'Nome do serviço' (but 
thats not what ruby sees)

so...

I need a way to convert 'Nome do serviço' to 'Nome do servi\347o' (i think...)

# Code to convert from 'Nome do serviço' to 'Nome do serviço'
# stolen from somwhere

def entities( str )
  converted = []
  str.split(//).collect { |c| converted << ( c[0] > 127 ? "&##{c[0]};" : c ) }
  converted.join('')
end
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6766&messageID=19489#19489
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to