Fossil Rock Posted March 7, 2006 Author Share Posted March 7, 2006 Thanks, I'll try it out. FYI the COPY command does not convert unicode to ansi the way TYPE does. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Fossil Rock Posted March 7, 2006 Author Share Posted March 7, 2006 Ok, you need to use some data in the file with extended characters to see the problem. I've attached a file (Unicode.txt) with all the instructions and extended characters to test with. Hopefully someone will recognise the problem. ThanksUnicode.txt Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Fossil Rock Posted March 7, 2006 Author Share Posted March 7, 2006 (edited) I also just learned a neat trick with cmd.exe.At the cmd prompt type "(" followed by {enter}You can enter many commands (1 per line) after More? and then type ")" followed by {enter} on the last last line and it will run it like a batch file.The next trick is to get the syntax correct with RunWait(@ComSpec ......Example:C:\>(More? ECHO This is a really cool trick.More? ECHO The time is %time%.More? )This is a really cool trick.The time is 16:29:58.52.C:\> Edited March 7, 2006 by Fossil Rock Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Fossil Rock Posted March 7, 2006 Author Share Posted March 7, 2006 Here's a slow workaround, but at least it does it correctly. $UNICODE = 'C:\Unicode.txt' $ANSI = 'C:\Ansi.txt' $CONVERT = '"' & $UNICODE & '"' & " > " & '"' & $ANSI & '"' Run("C:\WINDOWS\system32\cmd.exe") WinWaitActive ("C:\WINDOWS\system32\cmd.exe") Send ("chcp 1252 {enter}") Send ('type ' & $CONVERT & '{enter}') Send ("exit {enter}") Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now