Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QSqlField to UTF-8



  • Hi, I'm doing queries that return strings with characters like Ñ, é, á, etc; but instead of that characters, I got another symbols that looks like trash at my interface.

    With Qt4.8 I fixed with this lines:

    @QTextCodec::setCodecForTr(QTextCodec::codecForName("ISO-8859-1"));
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("ISO-8859-1"));
    @

    But with Qt 5, setCodecForCStrings it's deprecated. So, what can I do?

    Thanks


Log in to reply