Closed ThaumicMekanism closed 3 years ago
Tagging @SyntaxBlitz in case you're able to get to this sooner than I am.
I haven't looked into this, but does doing byte comparisons vs strings affect how Unicode is handled? Thanks!
I've tested this a bit with different encodings. Since this compares byte-for-byte, you don't have the opportunity to, say, load the reference file as UTF-16 and compare it against a string from the (not-UTF-16) subprocess output, but that was going to be a pain in python2 anyway. As long as the reference file is encoded sensibly, it seems to work fine.
This PR updates the existing examples to no longer use python2 and instead use python3. Due to differences in how strings are managed, any diff case uses byte object instead of converting it to a normal string.