Results 1 to 2 of 2

Thread: QSettings Codec Problem

  1. #1
    Join Date
    Dec 2009
    Posts
    15
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default QSettings Codec Problem

    Hi all,

    I try to read the values from an ini file using by QSettings. That file includes Turkish characters (İ, ç, ğ, etc). I can’t solve this problem although I’ve used setIniCodec. What can the problem be?

    Qt Code:
    1. QSettings mSettings("params.ini", QSettings::IniFormat);
    2. mSettings.setIniCodec("ISO 8859-9");
    3. QStringList mAliases = mSettings.value("SerialNumbers/AliasList").toString().split(",");
    To copy to clipboard, switch view to plain text mode 

    The content of Ini file:
    [SerialNumbers]
    AliasList=“TSD,YBS,İAS”

    The values of mAliases: TSD, YBS, \460AS

    Thanks a lot for your helps and clarification.

  2. #2
    Join Date
    Dec 2009
    Posts
    15
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default [SOLVED] QSettings Codec Problem

    The problem has been solved by using QTextCodec::setCodecForCStrings.

Similar Threads

  1. Qt phonon and Codec
    By alexcuiCN in forum Qt Programming
    Replies: 2
    Last Post: 27th April 2010, 09:56
  2. QSettings problem!
    By 0xl33t in forum Newbie
    Replies: 5
    Last Post: 28th July 2009, 09:15
  3. QSettings problem
    By eleanor in forum Qt Programming
    Replies: 5
    Last Post: 4th May 2009, 15:11
  4. Problem with QSettings
    By arbi in forum Qt Programming
    Replies: 2
    Last Post: 24th September 2008, 09:49
  5. QSettings problem?
    By cyberboy in forum Qt Programming
    Replies: 2
    Last Post: 28th June 2008, 22:14

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.