3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009-2011 Yukikaze
11 z_ascii = u"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz !”#$%&’()*+,−./:;<=>?@[¥]^_‘{|}〜 〜"
12 h_ascii = u"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz !\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ -"
13 z_ascii_sp = unichr(0x2212)+unichr(0xff0e)
14 h_ascii_sp = unichr(0x002d)+unichr(0x002e)
15 z_number = u"0123456789"
16 h_number = u"0123456789"
17 z_alphabet = u"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz #"
18 h_alphabet = u"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz #"
25 i = z_ascii_sp.find(s)
33 def toHankaku_ABC123(str):
36 i = z_alphabet.find(s)
39 i = z_ascii_sp.find(s)
47 def checkCharacterType(character):
49 return code is 1:Alphabet 2:Hiragana 3:Katakana 4:Kanji
52 if chcode>=0x0000 and chcode<=0x007F:
54 elif chcode>=0x3040 and chcode<=0x309F:
56 elif chcode>=0x30A0 and chcode<=0x30FF:
58 elif chcode>=0x4E00 and chcode<=0x9FFF: