You are not logged in.
Hi Denis, about
ReNamer:Pascal_Script:Functions#File_Read/Write
function FileReadLines(const FileName: WideString): TAnsiStringArray;
Is that is correct that this is still a ANSI array?
I searched for such a function and I missed smtg like:
function FileReadLines(const FileName: WideString): TWideStringArray;
Is such perhaps planned, or is there a other way?
I have noticed FileReadText():WideString;
but I think a array would be nicer to work with?
I work on that "Load s&r pairs from file" script from the other thread from today.
http://www.den4b.com/forum/viewtopic.php?id=2307
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
FileReadLines returns TAnsiStringArray for backwards compatibility. It also doesn't handle any text encodings, unlike FileReadText.
We have two options:
1) Change the return type of FileReadLines to TWideStringArray, but break backwards compatibility.
2) Create another function like FileReadTextLines: TWideStringArray.
I am still deciding what's best in a long run...
Offline
Looks like the only way is to provide a new function to not break old scripts?
function FileReadLines( const FileName: WideString): TAnsiStringArray; //Read all lines from a file FileName. Basic ANSI chars only.
function FileReadTextLines(const FileName: WideString): TWideStringArray;//Read all lines from a file FileName. Unicode string aware.
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
FileReadTextLines function will be added in v6.7.0.1 Beta.
Offline
ReNamer v6.7.0.1 Beta is now available for download. It contains the new FileReadTextLines function.
Offline