128: import sys 129: sys.path = ['']+sys.path 130: from interscript.encoding.utf8 import utf8, parse_utf8 131: uin = 0 132: print 'Begin' 133: while 1: 134: us = utf8(uin) 135: uout, i = parse_utf8(us,0) 136: if uin != uout: 137: hexes = '' 138: for ch in us: 139: hexes = hexes+hex(ord(ch))+' ' 140: print 'round trip failure uin=',uin,'uout=',uout,'encoding=',hexes,'len',i 141: raise "AxiomFailure" 142: if uin == 0xFFFF: break 143: uin = uin + 1 144: print 'Fin'
1: Begin 2: Fin