Missing char after Carriage Return in .txt preview
Posted: Sun Aug 12, 2007 9:31 am
When there is a .txt file as an attachment, UE displays the file in grey. However some files are displayed with missing characters at the beginning of the line.
Looking at the hex of the file, it appears that the file contains Carriage Returns only, not followed by Line Feed. So what is happening is that UE is reading a CR then expecting a LF. So it sucks in the next character and throws it away.
For example "ABCDEFcrIJKLcrcrMNOPcrQRSTUV" comes out as
ABCDEF
JKL
MNOP
RSTUV
I realise the format of the original file is wrong, but it would be nice if UE tried its best to ignore that.
Looking at the hex of the file, it appears that the file contains Carriage Returns only, not followed by Line Feed. So what is happening is that UE is reading a CR then expecting a LF. So it sucks in the next character and throws it away.
For example "ABCDEFcrIJKLcrcrMNOPcrQRSTUV" comes out as
ABCDEF
JKL
MNOP
RSTUV
I realise the format of the original file is wrong, but it would be nice if UE tried its best to ignore that.