Results 1 to 3 of 3

Thread: [SOLVED]Qt 5.7 string encoding issues

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2008
    Location
    Poland
    Posts
    80
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default [SOLVED]Qt 5.7 string encoding issues

    Hey mates

    I read a value from database which contains special national characters,say "zażółć gęślą jaźń",and try to display it as a QString.
    In old days Qt4 there were setCodecForCString() and setCodecForTr() whose worked well,sadly these are obsolete in Qt 5.7.

    I've googled for a solution,but either found advices to use the above,obsolete functions,or some like QTextCodec::setCodecForLocale(QTextCodec::codecFor Name("utf-8")),or ensure Qt Creator uses UTF-8 encoding.Unfortunately,nothing worked for me :/

    Therefore I'm asking you for help,how nowadays in Qt 5.7 national characters should be handled properly in an application?
    Last edited by MasterBLB; 4th August 2016 at 11:57.

Similar Threads

  1. QtScript encoding
    By folibis in forum Qt Programming
    Replies: 10
    Last Post: 21st October 2013, 21:33
  2. Encoding/decoding a string to URL and HTML
    By ultr in forum Qt Programming
    Replies: 4
    Last Post: 25th September 2010, 21:40
  3. std:string how to change into system:string?
    By yunpeng880 in forum Qt Programming
    Replies: 1
    Last Post: 14th April 2009, 08:51
  4. Character encoding issues
    By yagabey in forum Qt Programming
    Replies: 11
    Last Post: 15th December 2008, 22:20
  5. Encoding a QString to No.?
    By vishal.chauhan in forum Qt Programming
    Replies: 6
    Last Post: 30th August 2007, 19:08

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.