mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
![]() Following the principals of https://nedbatchelder.com/text/unipain.html our goal is to decode bytes in to unicode as soon as we read them and encode unicode date to bytes at the last second. The specific problem we were seeing was caused by calling "encode" on a byte string rather than a unicode string. Python attempts to be "helpful" and tries to decode the bytes as ASCII in order to provide a unicode string to the encode function. Since the bytes aren't ASCII, the decode fails and we get the UnicodeDecodeError despite the fact that we never explicitly asked for a decode at all. Also, calculate checksums correctly for tarballs that have files with UTF8 characters in the file name. |
||
---|---|---|
.. | ||
functional | ||
unit |