...encoding in Python.
Backport of core PR13440 and PR13448
https://github.com/bitcoin/bitcoin/pull/13440/files
https://github.com/bitcoin/bitcoin/pull/13448/files
The linter has been converted to PHP and integrated into arcanist within
the same diff, as it is simple enough. It also gets improved to behave
correcty when the arguments are spead over multiple lines. It also graps
the open() call nested in another function call.