I have been using Nokogiri for many years without any problem, lately I have read that the oga gem (https://github.com/yorickpeterse/oga) consumes less resources and I would like to try it myself, but I am having problems because of the coding issue.
Nokogiri always encoded correctly the html scraped but oga does not, for example I have problems with the Spanish Ñ, or Greek, Japanese or Chinese characters.
I have tried this but it does not solve it
Oga.parse_html(string.force_encoding(Encoding::ISO_8859_1).encode(Encoding::UTF_8))