Erion Posted January 29, 2011 Posted January 29, 2011 Hello, I'm trying to make a universal text replacer utility which works accross multiple files, inside compressed files, etc. (Not sure about binary mode, yet.) Is there a reliable way to detect character encoding in a file? I know that the built in reading functions can automagically do it, though I will most probably have trouble writing the result back, as I am not sure whether the write functions are unicode aware too. Also, AutoIt has certain limits, but I'd like to optimise code as much as possible. Any advice regarding this would be great. Erion
wakillon Posted January 29, 2011 Posted January 29, 2011 See for FileGetEncoding function ! AutoIt 3.3.18.0 X86 - SciTE 4.4.6.0 - WIN 11 24H2 X64 - Other Examples Scripts
Erion Posted January 29, 2011 Author Posted January 29, 2011 Hello, Yes. The problem with that is I would have to open the file in reading mode, get the encoding, close the file, open it again in the mode the function returns, read it in, close, open for writing (if its ansi), write... When doing many operations on thousands of files it seems a bit slow, especially if I am doing regexp replacing too. Erion
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