Toad World® Forums

Problem with unicode in automation script.

Hi all.

I have a this big problem.

I want to replace a string in a script with another script using variables and “find/replace” and run this modified script…
Everything seems to work fine but TDA don’t save the new file in the right format !
When i open the modified script file (.tas) with notepad++, encoding is not unicode !
here is the message :

There is no Unicode byte order mark. Cannot switch to Unicode.

Help me please !

ToadSupportBundleToad for Data Analysts.txt (36.7 KB)

Seems like a bug. Can you please provide us the following scripts:

  1. Script that has a string to be replaced.
  2. Replacement script.
  3. Script that makes the replacement.
  4. Resulting modified script that is in the wrong format.

That would be really helpful. You can send those directly to me (



Hi Franck,

I’ve already responded you in the email but thought I’ll answer here as well just because someone else might be having the same problem.

This problem emerges in a very specific (okay, it might be not so specific for you) situation when Find&Replace activity is being used on tas files meaning you use Find&Replace to alter some Automation script. Tas file is utf-16 encoded but doesn’t have BOM which forces .NET StremReader that we use internally to use utf-8 by default. This, in turn, is a problem for the workflow deserializer that sees utf-16 in the tas file header and tries to use it to deserialize utf-8 text.

I’ve created CR101039 to track this issue.

Thanks for catching it,


Just to let you know, this bug was fixed and included in TDP 3.2.