Allow decoding files with invalid utf-8 - #21
Conversation
|
Hi @davisdude, Thank you for your contribution! It'd definitely be useful to allow utf8 decoding error handling to be customised. From an initial look at your PR - you've considered everything, including tests, and updated the code sympathetic to the existing style - I appreciate that. 👍
I'm sorry this doesn't provide the result you're looking for right now. (I haven't had the time to put care into this repo over the last years.) |
Summary
This was inspired by my work with a slippi replay file (attached). The replay file contained a string with invalid utf-8 data. I would like to be able to parse this replay file.
Changes
I updated both the C and Python code and added some new test cases for handling invalid string data. Note that I did not update the encode functionality.
Tests
All tests still pass (except the recursion test, which I disabled locally for testing):
Additionally, the file that I couldn't parse before is now parsable!
Attachments