Closes #19878: Fix segfault in bz2 module.

Initial patch by Vajrasky Kok.
Issue #19099: The struct module now supports Unicode format strings.