Using the following:
 Code:
Break On
@KIX ??

$test=" some text "
? 'Spaces:' ?
'"' $test '"'

$test=" some text "+chr(9)
? 'Spaces + Tab:' ?
'"' $test '"'

$test=" some text "+chr(13)+chr(9) 
? 'Spaces, Tab, & CR' ?
'"' $test '"'

$test=chr(10)+" some text "+chr(13)+chr(9) 
? 'All Chars:' ?
'"' $test '"'
it becomes clear that only SPACES are dealt with by Trim(), not "Whitespace". The "garbage" you get is exactly what's expected when you move to a new line, remove spaces, print "some text" (9 characters" followed by a CR, then tab to position 8 - only the last "t" is left.

Per the manual, it says "spaces" and not "whitespace".

Glenn
_________________________
Actually I am a Rocket Scientist! \:D