Results 1 to 5 of 5

Thread: output UTF?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2006
    Location
    Erlangen, Germany
    Posts
    58
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    11
    Thanked 1 Time in 1 Post

    Default Re: output UTF?

    thank you both. Meanwhile i realized, that just the setGenerateByteOrderMark seemed to have worked: there were some bad characters left in my database, so it wasn't my apps fault to export them.
    nevertheless i am sure it makes sense to use the setCodec for output. But what about the input? how can i know which format the file is in. As long as it has been generated by my app it's easy, but of course i want to be able to use my importfilter for easily inserting handwritten data as well.
    shouldn't Qt automatically convert everything to UTF?

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

    Default Re: output UTF?

    Quote Originally Posted by mikro
    how can i know which format the file is in
    Let the user specify it.

    Quote Originally Posted by mikro
    shouldn't Qt automatically convert everything to UTF?
    Internally Qt does use Unicode, but when you read something you must tell it what encoding to use (otherwise it will assume that input is encoded using QTextCodec::codecForLocale() or try to guess if it isn't UTF-16).

Similar Threads

  1. Replies: 7
    Last Post: 8th May 2009, 10:26
  2. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34
  3. Replies: 2
    Last Post: 2nd June 2008, 08:45
  4. QProcess and capturing output
    By Aragorn in forum Qt Programming
    Replies: 7
    Last Post: 3rd May 2007, 16:57
  5. redirection of standard input and output
    By guestgulkan in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2006, 20:30

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.