def is_katakana(src): r = re.search(r'^(\xe3(\x82[\xa1-\xbf]|\x83[\x80-\xb6]|\x83[\xbb-\xbe]))+$',src.encode('utf8')) return ( r != None )