It's not outputting in ASCII. (I beleive it's unicode)
> I'm trying to build telnet scripts using Powershell and run them with
> the Telnet Script Tool (TST) but files created by Powershell are not
> recognized as valid text/script files by TST.
> I discovered files generated by Powershell are more than twice the
> size of plain text files created outside of Powershell.
> Here is the test:
> [PowerShell]
> "test"> test.a
> [Cmd.exe]
> echo test> test.b
> A 'dir' of these files from a shell reveals:
> 05/16/2008 09:34 AM 14 test.a
> 05/16/2008 09:34 AM 6 test.b
> *Notice the size of the files.
> What's going on? The test.b file is appropriately 6 bytes: "test\r\n"
> = 6 chars. Where are the extra 8 chars coming from in the PS-created
> file?
> The files in any text editor appear identical and Textpad said they
> were identical as well.
> Then I opened a PS-created file in MS Word 2007 and saw non-printable
> chars before each char in the file.
> Please help. Thx.