there is something funky about the control characters. if they start the string as in your example, they produce unexpected results:
 Code:
dim $OutString, $i

for $i=128 to 143  ; -> 16 Chars
  $cnt16=$cnt16+1
  $OutString = $OutString + chr($i)
  if $cnt16<>len($Outstring)
   $i " " $cnt16 " " len($Outstring)
   $cnt16 = len($Outstring)
  endif
next


but, if you make the string a string and add the chars, it works correctly:
 Code:
dim $OutString, $i
$Outstring="a"
$cnt16=1

for $i=128 to 143  ; -> 16 Chars
  $cnt16=$cnt16+1
  $OutString = $OutString + chr($i)
  if $cnt16<>len($Outstring)
   $i " " $cnt16 " " len($Outstring)
   $cnt16 = len($Outstring)
  endif
next


now, making $OutString just an empty string does not fix the behavior, it actually needs to contain ascii val. in this case the letter a.
_________________________
!

download KiXnet