Hello,
i am using LoadFromTextfile function of TNextGrid to read a none unicode textfile into the grid.
Short time ago i compiled my project first time in XE2 and LoadFromTextFile function stopped working.
I think it has to do with unicode string/char types used in xe2.
I changed the bold lines, and textfile is readed correctly now.
procedure TNxCustomGridControl.LoadFromTextFile(const FileName: WideString;
Separator: WideChar = ','; MultiLineSeparator: WideChar = '|';
StartRow: Integer = 0);
var
b: Byte;
w: Word;
fw: File of WideChar;
f: File of Byte;
fa: File of AnsiChar; //File of Char;
QChar, wc: WideChar;
Ch: AnsiChar; //Char;
QNo: Integer;
Value: WideString;
UnicodeFile, UnicodeBigEndian, AddValue, NewRow, EofF: Boolean;
ColumnIndex, RowIndex, ReadIndex: Integer;
begin
CSE
Member Since 25 May 2009Offline Last Active Apr 17 2023 11:12 AM