sylikc / pyexiftool

PyExifTool (active PyPI project) - A Python library to communicate with an instance of Phil Harvey's ExifTool command-line application. Runs one process with special -stay_open flag, and pipes data to/from. Much more efficient than running a subprocess for each command!
Other
148 stars 19 forks source link

Documentation of .encoding - UTF-8 vs utf-8 #58

Closed nitmws closed 1 year ago

nitmws commented 1 year ago

The documentation of propertyexiftool.ExifTool.encoding tells:

Default to UTF-8 if nothing is returned ...

But the code of the @encoding.setter is:

ENCODING_UTF8: str = "utf-8" ... and ... self._encoding = new_encoding or (locale.getpreferredencoding(do_setlocale=False) or ENCODING_UTF8)

Therefore the documentation should tell:

Defaults to utf-8 if nothing is returned ...

... else debugging people like me may be wondering why the self._encoding value is not 'UTF-8'.

sylikc commented 1 year ago

fair point. I'll rebuild the documentation later, but I fixed it in the docstring. thanks for the input