Whether a character in a Chinese, Chinese characters

In the python code execution process do not know what is the meaning of this character, whether it is Chinese, and

All the code is translated into a binary form that is 000111, the machine can understand the language.

  That is, all of the characters are computer digital represented. There is also a digital representation of characters,

Unicdoe4E00 ~ 9FFF showing Chinese, so if a utf-8 character encoding in this range, it is

That it is Chinese. - https://www.cnblogs.com/qingkongwuyun/p/9094824.html

zhmodel = re.compile (u '[\ u4e00- \ u9fa5]') # Check Chinese 
contents = u '{data}' . format (data = num [0]) # The utf-8 encoded string to 
if zhmodel .search (Contents): 
    # If there is True, if that does not exist FALSE

  

 

Guess you like

Origin www.cnblogs.com/qiaoer1993/p/11370550.html