Results 1 to 2 of 2

Thread: Charset: latin1 in MySQL Why?

  1. #1
    Join Date
    Jun 2014
    Qt products
    Unix/X11 Windows

    Default Charset: latin1 in MySQL Why?

    Hi everyone

    I have a problem with a mysql connection, in my code:

    Qt Code:
    1. if(QSqlDatabase::isDriverAvailable("QMYSQL")){
    2. QSqlDatabase myDB = QSqlDatabase::addDatabase("QMYSQL");
    3. myDB.setHostName(S);
    4. myDB.setUserName(U);
    5. myDB.setPassword(P);
    To copy to clipboard, switch view to plain text mode 

    Whe I try to connect, I use Wireshark and I see that:


    How I can change this? I wanna use UTF8 but I don't know how do this.

    Please, anybody can help me?


  2. #2
    Join Date
    Mar 2009
    Brisbane, Australia
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Unix/X11 Windows
    Wiki edits

    Default Re: Charset: latin1 in MySQL Why?

    Take a look at the [client] section in your my.cnf file for a "default-character-set=utf8" entry. Where that config lives is dependent on your environment (and there are several places the client might look).

Similar Threads

  1. MySQL and QT
    By arjoshi in forum Newbie
    Replies: 7
    Last Post: 15th March 2011, 16:11
  2. I need MySQL driver for Qt 4.6, WindowsXP(32), MySQL 5.1
    By User_3 in forum Installation and Deployment
    Replies: 7
    Last Post: 15th October 2010, 16:19
  3. QFtp and non-Latin1 FTP servers
    By miwarre in forum Qt Programming
    Replies: 1
    Last Post: 3rd August 2009, 13:44
  4. charset in QFont?
    By rajeshs in forum Qt Programming
    Replies: 5
    Last Post: 1st October 2007, 12:40
  5. MYSQL 5 Table qt model as small Mysql admin
    By patrik08 in forum Qt-based Software
    Replies: 0
    Last Post: 1st May 2007, 10:43

Tags for this Thread


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.