We open the file without specifying encoding which will default to default_external. If the file has entries in different encodings or non-UTF-8 encodings, this will fail.
A better solution would be to open the file in BINARY, and then attempt to handle each entry with respect to encoding, ie overriding to UTF-8.
We open the file without specifying encoding which will default to default_external. If the file has entries in different encodings or non-UTF-8 encodings, this will fail.
A better solution would be to open the file in BINARY, and then attempt to handle each entry with respect to encoding, ie overriding to UTF-8.