leuce Posted July 31, 2006 Share Posted July 31, 2006 G'day everyone I'm trying to change a line in a file. The snag is that the file is a unicode file. The line I want to change does not contain any characters which do not occur in ASCII 255, but perhaps the fact that the file to write to is a Unicode file, has something to do with the fact that my _FileWriteToLine doesn't work. I've tried the following three options (that didn't work): $prefsfile = FileOpen (@AppDataDir & "\OmegaT\omegat.prefs", 1) _FileWriteToLine($prefsfile, 9, "<tab_advance>true</tab_advance>", 1) FileClose($prefsfile) $prefsfile = @AppDataDir & "\OmegaT\omegat.prefs" _FileWriteToLine($prefsfile, 9, "<tab_advance>true</tab_advance>", 1) _FileWriteToLine(@AppDataDir & "\OmegaT\omegat.prefs", 9, "<tab_advance>true</tab_advance>", 1) The strange thing is, I could have sworn that the first one above did work on my Windows XP machine at the office. I'm using Windows 2000 at home, you see. Is this perhaps an OS issue? Thanks! Samuel Link to comment Share on other sites More sharing options...
evilertoaster Posted July 31, 2006 Share Posted July 31, 2006 (edited) I think autoit will always write in standard ASCII mode. Unicode is not directly supported (maybe a UDF is out there somewhere). Like I said another post, you'll proabally have to do Raw file i/o untill somthing mor elaquant is availableEdit: made some fucntions you may find usefull...at least give you some ideas...check http://www.autoitscript.com/forum/index.php?showtopic=30149 Edited August 1, 2006 by evilertoaster 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