Adds an optional encoding argument to #text, #html and .read for setting the output character encoding, which is passed to Tika as the --encoding option. This value is validated against Ruby's Encoding.name_list, raising an ArgumentError if it isn't included in the list.
Why is it needed?
So we can set the output encoding via Henkei / Tika instead of having to do it ourselves afterwards.
What's this PR do?
Adds an optional
encoding
argument to#text
,#html
and.read
for setting the output character encoding, which is passed to Tika as the--encoding
option. This value is validated against Ruby'sEncoding.name_list
, raising anArgumentError
if it isn't included in the list.Why is it needed?
So we can set the output encoding via Henkei / Tika instead of having to do it ourselves afterwards.
Where should the reviewer start?
lib/henkei.rb:222
How should this be manually tested?