In python3 encode was applied after after splicing the string. With encode, utf-8 characters are potentially expanded to multiple octets. For a given block that exceeded MAX_PACKAGE_LENGTH this resulted in the
last few octets falling off a package.
Coverage increased (+0.02%) to 87.117% when pulling aeb28495e32a0be6d7dd0f6678d8cefcee787b94 on basbloemsaat:fix_utf8_packet_cutoff into c9c92205508e0bfa09a2f6cde665e0795437aff7 on gijzelaerr:master.
In python3 encode was applied after after splicing the string. With encode, utf-8 characters are potentially expanded to multiple octets. For a given block that exceeded MAX_PACKAGE_LENGTH this resulted in the last few octets falling off a package.