fix python unicode length problem