JustinWillis
IS-IT--Management
Hi, I am having problems reading from a text file that I am creating, it saves a string which is greater than 4096 in length to a line in a text file, but when I go to read it back into a string it only retrieves the first 4096 characters of it?
I am using TRichedit.lines.add('...') and then TRichedit.lines.savetofile('...'), looking at it in notepad it all looks fine, all the data is on the first line etc... then I use TRichedit.lines.loadfromfile('...') and see that all the data has been loaded BUT when I TString := TRichedit.lines[0] only the first 4096 chars are copied to the string.
I assume this is a limit of the string but I don't get why it lets me add more than 4096 to the line in the first place when it can't read it back?? anyone come accross this problem or know how to get around it?
Spreading the data accross multiple lines really isn't desired as it will slow down a speed critical app, any help would be much appreciated, I imagine there is a really simple solution that I am not seeing!
Apologies if i'm being stupid and wasting your time,
Thanks in advance,
Justin Willis.
I am using TRichedit.lines.add('...') and then TRichedit.lines.savetofile('...'), looking at it in notepad it all looks fine, all the data is on the first line etc... then I use TRichedit.lines.loadfromfile('...') and see that all the data has been loaded BUT when I TString := TRichedit.lines[0] only the first 4096 chars are copied to the string.
I assume this is a limit of the string but I don't get why it lets me add more than 4096 to the line in the first place when it can't read it back?? anyone come accross this problem or know how to get around it?
Spreading the data accross multiple lines really isn't desired as it will slow down a speed critical app, any help would be much appreciated, I imagine there is a really simple solution that I am not seeing!
Apologies if i'm being stupid and wasting your time,
Thanks in advance,
Justin Willis.