I'm using dulwich (a Python library) to access a git repository. When I use get_object
to retrieve a commit, it has a number of attributes. One of those is author
. When I retrieve this attribute, I get bytes
and so the attribute is an an unknown encoding.
Is there an encoding I can safely assume? Does git translate all the metadata to utf-8 before storing it? If it doesn't, how do I know which encoding to use to decode the bytes?
i18n.commitEncoding
value holds the correct value (default is UTF-8). – Adamoencoding
header, copied from the.git/config
setting. This is part of theobjects
data, so no hilarity, sorry. – AdamoNone
so I thought maybe it was meaningless. I guess maybe that means I can assume the default utf-8 for that particular commit. – Babby