I have some textfiles which need to become split on empty lines with :
cnt=CountString(text$,#CRLF$+#CRLF$)
This works great if files are created on windows (I believe, experiencing some troubles).
Now I made the same small text-file on Ubuntu (same editor Ultra Edit as on windows).
It has empty lines, but those are not recognized ?
I've been struggling some time until I thought, it must be the text-file itself. And ... it was.
Recreated the text-file on windows and it works also on Ubuntu.
(the hex view mode, of this text-file, in UE shows no difference)
This must be related to those #PB_UTF8 and #PB_Unicode settings I think.
But how or where can I detect these differences or see if the file is created on windows or Ubuntu.
I would like to have use of bothh type of text-file, no matter if they were made on windows or Ubuntu.
The only place I can think of where this difference can be is inside this part (but I have no idea) :
Code: Select all
Procedure.s File_Into_Mem(file$, flag.i=#PB_File_SharedRead | #PB_UTF8)
Protected open.i
Free_File_Mem()
open=ReadFile(#PB_Any,file$,flag)
If open
MyFileBuffer=AllocateMemory(Lof(open))
MyFileSize=Lof(open)
FileBuffersSize(open, 0)
ReadData(open,MyFileBuffer,Lof(open))
CloseFile(open)
ProcedureReturn PeekS(MyFileBuffer, MyFileSize, #PB_UTF8)
EndIf
ProcedureReturn ""
EndProcedure