>>>>> "S" == SKa  <kamphausen / novelscience.com> writes:

S> def iso_unformat(t)
S>   if t.size == 8
S>     [ t[0,4], t[4,2], t[6,2] ]
S>   elsif t.size == 14
S>     [ t[0,4], t[4,2], t[6,2], t[8,2], t[10,2], t[12,2] ]  
S>   end
S> end

 Have you tried with unpack ?

   def iso_unformat(t)
      t.size == 8 ? t.unpack("a4a2a2") : t.unpack("a4a2a2a2a2a2")
   end


Guy Decoux