add optional encoding argument to fileopener (#72715)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/72713
TODO: add test
cc ejguan
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72715
Reviewed By: samdow
Differential Revision: D34212650
Pulled By: ejguan
fbshipit-source-id: 78db4cc04ec0db8fd25b3d1e6c77eb0616075960
(cherry picked from commit c1898031c0a80c4dc7ef23a48d23acba70f465a1)