PDA

View Full Version : Handling mac text format files - support?



bnilsson
29th March 2008, 13:10
I am trying to modify the sdi example (on my way to my own app) to accetpt mac, dos and unix text file formats.
Dos and unix are ok, but a chunk of text in read from a mac text file becomes one long string, difficult to parse.
Is there any QTextStream (or similar) function to handle this?

Text line separators:
unix = "\n"
dos = "\r\n"
mac = "\r"

It seems "\r" is simply ignored by QTextStream.

I know Mac text format files are a dying spieces, but I don't want my app to crasch if it encounters one.