Results 1 to 16 of 16

Thread: Problem with reading from file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problem with reading from file

    have a look at QTextStream, using it you can set needed encoding.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  2. #2
    Join Date
    Oct 2008
    Location
    Thodupuzha, a small town in kerala
    Posts
    31
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Problem with reading from file

    Thanks spirit for the quick reply. I tried QTextStream::setCodec() function to change to different character coding schemes. But none of them is working. I think characters like " ' " is causing the problem. Which is the encoding scheme that supports these characters.

    Jayanth.S

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Problem with reading from file

    Quote Originally Posted by iamjayanth View Post
    I think characters like " ' " is causing the problem. Which is the encoding scheme that supports these characters
    Everyone! What encoding has your file. Make sure you use the same. Under Linux you can type under console
    Qt Code:
    1. $ file yourfile.txt
    To copy to clipboard, switch view to plain text mode 
    to get the encoding. And please show us, how you have used QTextStream.

Similar Threads

  1. EXE File problem
    By triperzz in forum Installation and Deployment
    Replies: 8
    Last Post: 18th January 2008, 19:00
  2. Debug problem in Eclipse with qrc file
    By Vortex in forum General Programming
    Replies: 6
    Last Post: 27th December 2007, 00:56
  3. QWT 5, QT3, SuSE 10.2. Crash and burn
    By DrMcCleod in forum Qwt
    Replies: 8
    Last Post: 7th September 2007, 20:53
  4. QHttp "PUT METHOD" QT Problem File Upload. RFC 2616
    By patrik08 in forum Qt Programming
    Replies: 7
    Last Post: 25th October 2006, 22:02
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

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.