codec error when leading/trailing strings.