Another encoding hack to avoid python 2 brokenness