python字符串轉碼筆記

str = "\u51b7\u6210\u5f62\u7528\u6241\u5e73\u6750\uff0cflat products for cold forming"
y = str.decode('unicode-escape')
print(y)

str = "\xe6\x89\x81\xe5\xb9\xb3\xe4\xba\xa7\xe5\x93\x81"
y = str.decode('utf-8')
print(y)

 

打印內容code

冷成形用扁平材,flat products for cold forming
扁平產品orm

相關文章
相關標籤/搜索