Open myersjustinc opened 5 years ago
@myersjustinc Thanks for this! I am not sure if the folks at the NYT are still maintaining this, but I've got a fork here and would be happy to have this PR there.
Sounds good. Once I've filed a matching PR on dwillis/Fech, should I also leave this one open on this repo, or should I close this one to avoid confusion?
I would leave it open, as I'm unsure whether this repo is actively monitored.
The
@encoding
instance variable on aFiling
object is ignored in methods such asFiling#form_type
, which can lead to anArgumentError
("invalid byte sequence in UTF-8"). Before the included change inlib/fech/filing.rb
is made, the included test case demonstrates such an error when we try to callFiling#summary
.This change takes
@encoding
into account when reading the filing from disk, which avoids theArgumentError
.(The entire test suite now only has two failing tests, both of which are addressed in #83 and don't appear to be related to this specific change.)