gottfrois / link_thumbnailer

Ruby gem that fetches images and metadata from a given URL. Much like popular social website with link preview.
MIT License
512 stars 106 forks source link

allow to convert encoding if valid charset provided in content-type header #109

Closed respire closed 7 years ago

respire commented 7 years ago

Description: link_thumbnailer cannot handle website with non-utf8 encoded page.

Solution: if charset is provided in response content-type header, try to use ruby stdlib Encoding::Converter to convert response body to utf8 encoded one

respire commented 7 years ago

hello @gottfrois , thanks for your comments! Changes are committed.

gottfrois commented 7 years ago

Looks much better! Thx!