Results 1 to 9 of 9

Thread: cannot handle macintosh end-of-line

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cannot handle macintosh end-of-line

    Then maybe std::getline() will do?

  2. The following user says thank you to jacek for this useful post:

    gaboo (27th September 2006)

  3. #2
    Join Date
    Sep 2006
    Location
    Lyon, France
    Posts
    6
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cannot handle macintosh end-of-line

    Quote Originally Posted by jacek View Post
    Then maybe std::getline() will do?
    I'll have a look at it, thanks.

  4. #3
    Join Date
    Sep 2006
    Location
    Lyon, France
    Posts
    6
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cannot handle macintosh end-of-line

    Answer from someone on qt-interest mailing list :

    Unfortunately, this is a known bug. But the Trolls do not seem to care that
    the Mac folk have lots of old text files to read. (The line ending on Mac OS
    X is now LF, not CR.)

    You will have to implement your own readLine, or fix Qt's.

    Of course, the _right_ way is to check for LF, CR, or LF/CR for every line.
    Making any assumptions based on the platform or first line is dangerous.
    (For instance, Visual Studio will create mixed line ending files when you
    edit a different line ending type than the default. Edited lines will have
    the default, but other lines retain the original.)

    This has been a problem for years that is so easily solved. I fail to
    understand why some developers still try to force everyone else to use their
    line ending choice. It is such a Microsoft attitude.

    Keith

Similar Threads

  1. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42
  2. QListWidget-problem
    By Sarma in forum Qt Programming
    Replies: 7
    Last Post: 7th April 2006, 18:49
  3. QTextBrowser with line numbers
    By sreedhar in forum Qt Programming
    Replies: 1
    Last Post: 3rd April 2006, 13:23
  4. MouseEvent on a line
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 25th March 2006, 08:52
  5. How to detect new line?
    By whoops.slo in forum Newbie
    Replies: 6
    Last Post: 6th January 2006, 17:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.