When I do not use the UTF8Encode/Decode it does not work.
That must mean that my string is not unicode?
Correct. If your file isn't encoded in the format you are expecting, decoding file contents into Unicode String won't work and you will get wrong results.
You assign the myStr.Test to myUnicode.
Do you mean it is not possible to assign myStr.text directly to myVar.asText ?
You should also be able to assign "myStr.text" directly to "myVar.asText". I was using a String variable "myUnicode" so you can check its contents and compare the results.
Best Regards,
Danijel Tkalcec