Only as a general remark, if you want to work with text you don't whether or not it's UTF, use something like:
; check for $isutf as $utfdecode will cause an error if the text contains non-utf $chr(128) - $chr(255)
var %t = -yourtext-
-do somwthing with- $iif($isutf(%t),$utfdecode(%t),%t)
Example of the different isutf-states:
var %x = a ä Ã $+ ¤, %n = 1
while ($gettok(%x,%n,32)) {
var %t = $v1
echo -a isutf: $isutf(%t) :: $iif(($isutf(%t) == 2),decoding %t to $utfdecode(%t),processing %t)
inc %n
}