小编use*_*084的帖子

从字符串中删除unicode

我试图从阿拉伯字符串中删除特殊字符,使用它从我从这个链接获得的Unicode:https: //www.fileformat.info/info/unicode/char/0640/index.htm

这是我的代码:

TATWEEL = u"\u0640"
text = '???????? ???????'

text.replace(TATWEEL, '')
print(text)
Run Code Online (Sandbox Code Playgroud)

但我试过它并且不起作用(它打印相同的字符串而不删除字符)

这是特殊字符''

在此输入图像描述

我正在使用Python3

python string unicode

0
推荐指数
1
解决办法
418
查看次数

标签 统计

python ×1

string ×1

unicode ×1