wxTextFile and EOF

Manuel Martín mmartin at ceyd.es
Mon Dec 10 08:14:10 PST 2007


Hello

Suppose you have a text file consisting in 3 lines (all of
them ending in new-line) and an end-of-file char.
When reading it with wxTextFile, GetLineCount() returns
4 lines. I'm surprised this class treats EOF-char just like
any other char.

Thinking about it, I notice there are many chars in this case:
all below 0x20 excepting NL, CR and TAB. So I consider to manage
them apart from wxTextFile. But I think EOF-char should be
stripped out by wxTexFile on its own.

Is this a bug or a feature?

TIA
Manolo




More information about the wx-users mailing list