January 19, 2008 09:31:52 PM
Phil
Helper posted a file on the forum that can be read fine with other editors like PSPad and Notepad++, but it only shows a couple lines in CE. I'll attach the file here.
January 19, 2008 09:41:38 PM
Phil
After examining the file in a hex editor, it appears that CE terminates rendering a line when it encounters a null byte. PSPad and WordPan renders a space for the null byte. I did not check Notepad++ to see what it does.
January 20, 2008 12:02:02 AM
Ankit Singla
We should probably show the NULL as an "unknown byte" character...which currently is set to a ?, but I think we should probably use something else and not actually do the replacement as we currently do. If you open a file with unknown characters, they show as '?'. If you save said file with CE and reopen it in anything, the characters actually become '?' IIRC.
January 23, 2008 12:50:18 PM
Pvt_Ryan
I would be inclined to follow suit with the others and just render a space.
Would be nice to know what program is creating that file, and why it is inserting a null byte in the middle of the file.
One point I would make is that (generally) if a file is corrupted then it has 0x00 in the corrupt sections. Using a space would allow the file to still be readable. (perhaps we should also include a warning message that the file may be corrupt to warn the user, although I would expect some debate on this particular feature)
Would be nice to know what program is creating that file, and why it is inserting a null byte in the middle of the file.
One point I would make is that (generally) if a file is corrupted then it has 0x00 in the corrupt sections. Using a space would allow the file to still be readable. (perhaps we should also include a warning message that the file may be corrupt to warn the user, although I would expect some debate on this particular feature)
January 28, 2008 08:59:19 AM
Pvt_Ryan
I think the problem lies in cedtElement.cpp in the following function:
BOOL CAnalyzedText::FileLoad(LPCTSTR lpszPathName, INT nEncodingType, INT nFileFormat)
Also possibly this function:
BOOL CMemText::FileLoad(LPCTSTR lpszPathName)
Also of interest is:
cedtDoc.cpp
BOOL CCedtDoc::OnOpenDocument(LPCTSTR lpszPathName)
BOOL CAnalyzedText::FileLoad(LPCTSTR lpszPathName, INT nEncodingType, INT nFileFormat)
Also possibly this function:
BOOL CMemText::FileLoad(LPCTSTR lpszPathName)
Also of interest is:
cedtDoc.cpp
BOOL CCedtDoc::OnOpenDocument(LPCTSTR lpszPathName)

Syndicate