def toString (byte_string, field_name):
"""
Reformat the string
"""
result_string = ''
try:
result_string = byte_string.decode ('utf-8')
except AttributeError:
print ("The '" + field_name + "' field is not a UTF-8 string: '" + str (byte_string)+ "'")
return result_string
评论列表
文章目录