6.5.1.1. Test 14: utf8 round trip

On-the-fly python test script follows.
Start python section from utf8.ipk
   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'
End python section from utf8.ipk
Actual output follows.
Start output section of python <<temporary>>
     1: Begin
     2: Fin
End output section to python <<temporary>>