Results 1 to 2 of 2

Thread: Charset: latin1 in MySQL Why?

  1. #1
    Join Date
    Jun 2014
    Posts
    8
    Qt products
    Qt5
    Platforms
    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:

    SnapCrab_NoName_2014-6-4_20-55-13_No-00.png

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

    Please, anybody can help me?


    Regards.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,593
    Thanks
    13
    Thanked 1,587 Times in 1,516 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    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, 15: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, 15:19
  3. QFtp and non-Latin1 FTP servers
    By miwarre in forum Qt Programming
    Replies: 1
    Last Post: 3rd August 2009, 12:44
  4. charset in QFont?
    By rajeshs in forum Qt Programming
    Replies: 5
    Last Post: 1st October 2007, 11: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, 09:43

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.