bskinn / sphobjinv

Toolkit for manipulation and inspection of Sphinx objects.inv files
https://sphobjinv.readthedocs.io
MIT License
79 stars 9 forks source link

Revise anything with a text file interaction to accept an encoding, with default to locale-default #101

Open bskinn opened 5 years ago

bskinn commented 5 years ago

Otherwise there could be users who have to jump through hoops to make things work.

Ideally, the default would be UTF-8; but, in order to retain backward compatibility, the default for a v2 will need to match the encoding=None, which is locale.getpreferredencoding().

A switch to UTF-8 as default, while likely breaking very little code, would be a breaking change and need a major version bump.

bskinn commented 4 years ago

Per comment(s) #103, this may only actually be needed for interactions with decompressed inventories, and with JSON-formatted content, as compressed inventories always use the Python UTF-8 default encoding.