J
Jeremy Woertink
I keep getting this error
"encoding error : output conversion failed due to conv error, bytes 0xA0
0x69 0x64 0xC2
I/O error : encoder error"
whenever I try to append my html string to Nokogiri::HTML.
When I write that doc to a file, some of the spaces, or possibly letters
are weird looking characters.
Here is my (partial) output in irb:
...
href="CAyxDAAO?e=has-sub-sections">has-sub-sections</a><a
href="CAyxDAAO?e=header">header</a><a href="CAyxDAAO?e=home">home</a><a
href="CAyxDAAO?e=item-page">item-page</a><a
href="CAyxDAAO?e=justpro-888-519-5878">justpro-888-519-5878</a><a
href="CAyxDAAO?e=left-nav">left-nav</a><a
=> <pre><a
href="javascript:document.f3.SLID.value='F16';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">DIV</a>?id?<a
href="javascript:document.f3.SLID.value='F17';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"footer"</a>
<a
href="javascript:document.f3.SLID.value='F18';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">DIV</a>?id?<a
href="javascript:document.f3.SLID.value='F19';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"footer-icons"</a>
<a
href="javascript:document.f3.SLID.value='F20';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">IMG</a>?src?<a
href="javascript:document.f3.SLID.value='F21';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"/lib/yhst-72759769340912/yahoo.gif"</a>
<a
href="javascript:document.f3.SLID.value='F22';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">IMG</a>?src?<a
href="javascript:document.f3.SLID.value='F23';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"/lib/yhst-72759769340912/secure.gif"</a>
<a
href="javascript:document.f3.SLID.value='F24';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">DIV</a>?id?<a
href="javascript:document.f3.SLID.value='F25';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"copyright"</a>
<a
href="javascript:document.f3.SLID.value='F26';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">TEXT</a>?<a
href="javascript:document.f3.SLID.value='F27';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">@copyright</a>
<a
href="javascript:document.f3.SLID.value='F28';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
href=\"javascript:document.f3.SLID.value='F16';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">DIV</a>\240id\240<a
href=\"javascript:document.f3.SLID.value='F17';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"footer\"</a>\n <a
href=\"javascript:document.f3.SLID.value='F18';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">DIV</a>\240id\240<a
href=\"javascript:document.f3.SLID.value='F19';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"footer-icons\"</a>\n <a
href=\"javascript:document.f3.SLID.value='F20';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">IMG</a>\240src\240<a
href=\"javascript:document.f3.SLID.value='F21';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"/lib/yhst-72759769340912/yahoo.gif\"</a>\n
<a
href=\"javascript:document.f3.SLID.value='F22';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">IMG</a>\240src\240<a
href=\"javascript:document.f3.SLID.value='F23';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"/lib/yhst-72759769340912/secure.gif\"</a>\n
<a
href=\"javascript:document.f3.SLID.value='F24';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">DIV</a>\240id\240<a
href=\"javascript:document.f3.SLID.value='F25';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"copyright\"</a>\n <a
href=\"javascript:document.f3.SLID.value='F26';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">TEXT</a>\240<a
href=\"javascript:document.f3.SLID.value='F27';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">@copyright</a>\n <a
href=\"javascript:document.f3.SLID.value='F28';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
#{t}
eohtml
encoding error : output conversion failed due to conv error, bytes
0xA0 0x69 0x64 0xC2
I/O error : encoder error
=>
Is there something I should do different?
Thanks,
~Jeremy Woertink
"encoding error : output conversion failed due to conv error, bytes 0xA0
0x69 0x64 0xC2
I/O error : encoder error"
whenever I try to append my html string to Nokogiri::HTML.
When I write that doc to a file, some of the spaces, or possibly letters
are weird looking characters.
Here is my (partial) output in irb:
...
=> <a href="CAyxDAAO?e=footer">footer</a><atemplates = templates_page.search('/html/body/table[3]/tr[2]/td[2]//a')
href="CAyxDAAO?e=has-sub-sections">has-sub-sections</a><a
href="CAyxDAAO?e=header">header</a><a href="CAyxDAAO?e=home">home</a><a
href="CAyxDAAO?e=item-page">item-page</a><a
href="CAyxDAAO?e=justpro-888-519-5878">justpro-888-519-5878</a><a
href="CAyxDAAO?e=left-nav">left-nav</a><a
=> <pre><a
href="javascript:document.f3.SLID.value='F16';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">DIV</a>?id?<a
href="javascript:document.f3.SLID.value='F17';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"footer"</a>
<a
href="javascript:document.f3.SLID.value='F18';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">DIV</a>?id?<a
href="javascript:document.f3.SLID.value='F19';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"footer-icons"</a>
<a
href="javascript:document.f3.SLID.value='F20';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">IMG</a>?src?<a
href="javascript:document.f3.SLID.value='F21';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"/lib/yhst-72759769340912/yahoo.gif"</a>
<a
href="javascript:document.f3.SLID.value='F22';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">IMG</a>?src?<a
href="javascript:document.f3.SLID.value='F23';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"/lib/yhst-72759769340912/secure.gif"</a>
<a
href="javascript:document.f3.SLID.value='F24';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">DIV</a>?id?<a
href="javascript:document.f3.SLID.value='F25';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">"copyright"</a>
<a
href="javascript:document.f3.SLID.value='F26';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">TEXT</a>?<a
href="javascript:document.f3.SLID.value='F27';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
onmouseout="window.status='';">@copyright</a>
<a
href="javascript:document.f3.SLID.value='F28';%20document.f3.submit();"
title="Select" onmouseover="window.status='Select'; return true;"
=> "<pre><aonmouseout="window.status='';">LINEBREAK said:t = template_body.to_html.gsub(/[;|\s][a-zA-Z-]+[&|\s]/m) { |match| ?> if match != " return "
val = %{|#{match.scan(/[a-zA-Z-]+/).first}}
match.gsub(/[a-zA-Z-]+/, val)
end
}
href=\"javascript:document.f3.SLID.value='F16';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">DIV</a>\240id\240<a
href=\"javascript:document.f3.SLID.value='F17';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"footer\"</a>\n <a
href=\"javascript:document.f3.SLID.value='F18';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">DIV</a>\240id\240<a
href=\"javascript:document.f3.SLID.value='F19';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"footer-icons\"</a>\n <a
href=\"javascript:document.f3.SLID.value='F20';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">IMG</a>\240src\240<a
href=\"javascript:document.f3.SLID.value='F21';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"/lib/yhst-72759769340912/yahoo.gif\"</a>\n
<a
href=\"javascript:document.f3.SLID.value='F22';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">IMG</a>\240src\240<a
href=\"javascript:document.f3.SLID.value='F23';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"/lib/yhst-72759769340912/secure.gif\"</a>\n
<a
href=\"javascript:document.f3.SLID.value='F24';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">DIV</a>\240id\240<a
href=\"javascript:document.f3.SLID.value='F25';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">\"copyright\"</a>\n <a
href=\"javascript:document.f3.SLID.value='F26';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">TEXT</a>\240<a
href=\"javascript:document.f3.SLID.value='F27';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
onmouseout=\"window.status='';\">@copyright</a>\n <a
href=\"javascript:document.f3.SLID.value='F28';%20document.f3.submit();\"
title=\"Select\" onmouseover=\"window.status='Select';true;\"
#{t}
eohtml
encoding error : output conversion failed due to conv error, bytes
0xA0 0x69 0x64 0xC2
I/O error : encoder error
=>
Is there something I should do different?
Thanks,
~Jeremy Woertink