在从CSV文件中读取一些字符串时,我得到了一些奇怪的符号(由怪异的编码引起)。在原点中,符号是不可见的。例如:
ïfrom
现在,我想从这些文物中清除这个字符串(为了进一步复制),但isletter()
不起作用。有什么想法吗?
答案 0 :(得分:2)
If you want to only keep ASCII chars:
str = 'ïfrom dañó'; % example
str = str(str<128); % keep only codde points below 128, corresponding to ASCII
gives
str =
from da