Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Adding symbol ≥ in mysql table fails.

Adding symbol ≥ in mysql table fails.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nando76
    wrote on last edited by
    #1

    Hi,
    i use mysql and try to save the bigger-equal sign '≥' into a db attribute.

    I use something like
    @query.prepare("INSERT INTO test (ID, operator) VALUES (0, :operator)";
    query.bindValue(":operator", "≥");
    query.exec()@

    i always get:
    Incorrect string value: '\xE2\x89\xA5' for column 'operator' at row 1 QMYSQL3: Unable to execute statement

    columns in db should be utf8 encoded...

    Any Ideas?

    Greetings
    Nando

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you sure everything is setup correctly ?

      "This":http://jamesreubenknowles.com/setting-mysql-to-default-to-unicode-1861 might be of interest

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nando76
        wrote on last edited by
        #3

        Hi,

        Thank you.
        will try setting encoding in my.cnf and then report id it works.

        Greetings

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved