#18589
Stefan
Participant

Interesting.
The above shown ways should do it. Well, at least with smaller files size.

Unfortunately I can’t really test on my 32-bit system,… I have to many things running and not enough free memory for testing.

 
For an test I created a 581 MB text file with 130.000 x 4689 signs.
Open that in 32-bit EmEditor 14.4.0b2 shows this dialog:

---------------------------
EmEditor
---------------------------
This file contains a very long line. 
Very long lines will be split into several lines while the document is open, 
but will be recombined when saved. Highlighting very long lines is disabled, 
and some other features such as find and replace text containing CR or LF 
might not work correctly for very long lines.

c:\temp\jsout.txt
---------------------------
OK   Abbrechen   
---------------------------

 

and I ended up with 5 lines:
4x 134217729 chars
1x 072699089 chars

 

“Wrap by Char” was disabled.
 
RegEx s&r allocated 1,2 GB and I canceled after 3 minutes.

 

So I just quickly split the lines with SED.exe
c:\temp>sed -e “s/.\{4689\}/&\n/g” jsout.txt > jsoutSplitted.txt

Unfortunately here I also run out of memory, but with a smaller file this works well.
So on a 64-bit system that should be no problem,…I will try tomorrow just out of curiosity.

 

 

Code to create a test file (due to little memory I had to do a additional step as workaround)

Line="";
for(B=1, Bs=4689; B<=Bs; B++){
  Line += "X";
}
File="";
for(L=1, Ls=13000; L<=Ls; L++){
  File += Line ;
}
fso     = new ActiveXObject("Scripting.FileSystemObject");
oFile   = fso.OpenTextFile("C:\\temp\\jsout.txt", 2, true)
for(F=1; F<=10; F++)
  oFile.Write( File );
oFile.Close();