I need to write to html file some data, which could be non-english, now my code:
File.open('text2.html', 'wb') do |fo|
fo.write body_text3
end
also i try
File.open('text2.html', 'wb') do |fo|
fo.write body_text3.encode('UTF-8')
end
but i get error: :
in `encode': "\xD0" from ASCII-8BIT to UTF-8 (Encoding::UndefinedCon...
how could i save webpage with russian symbols?
also what i need to write, so that i could operate with nokogiri with my russian page? need i to do some conversations, or just # coding: utf-8 on top of code is enough?