Results 1 to 5 of 5

Thread: Character by Character (Unicode?) File Reading

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Location
    Madison, WI USA
    Posts
    153
    Thanks
    35
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Character by Character (Unicode?) File Reading

    QChar::unicode() would be useful but only after the file read takes place. I'm looking for something that will do a unicode character file read.

  2. #2
    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: Character by Character (Unicode?) File Reading

    Have a look at QTextStream. There you can set the codec and get a single character via QTextStream::read( qint64 maxlen ).

  3. The following user says thank you to Lykurg for this useful post:

    mclark (22nd April 2009)

  4. #3
    Join Date
    Aug 2006
    Location
    Madison, WI USA
    Posts
    153
    Thanks
    35
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Character by Character (Unicode?) File Reading

    Thanks people!

    It looks like the QTextStream::setAutoDetectUnicode() should do what I need.

Similar Threads

  1. Progress of reading the file
    By ModeZt in forum Newbie
    Replies: 1
    Last Post: 11th April 2009, 23:36
  2. help in reading XML file
    By cshiva_in in forum Qt Programming
    Replies: 1
    Last Post: 24th March 2008, 13:55
  3. QTextStream loses position while reading file
    By bjh in forum Qt Programming
    Replies: 2
    Last Post: 13th February 2008, 15:47
  4. Replies: 3
    Last Post: 18th October 2007, 18:07
  5. Reading a unicode names from a file???
    By darpan in forum Qt Programming
    Replies: 7
    Last Post: 3rd May 2006, 17:28

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.