Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-443

incorrect value for charset utf8mb4 and longtext column with multibyte unicode characters

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1.20, 3.2.3
    • 3.2.4
    • General
    • None
    • Windows 10

    Description

      When column of type longtext contains multibyte unicode characters ODBC driver does not return correct data - for varchar field it works ok...

      To reproduce:
      //init DB stuff (i use utf8mb4_czech_ci collation)
      create table test_table (s_col varchar(100), m_col longtext);
      insert into test_table values('🤣👍','🤣👍');

      //test in VBS file
      set conn=CreateObject("ADODB.Connection")
      conn.open "DRIVER=

      {MariaDB ODBC 3.2 Driver}

      ;SERVER=...;DATABASE=...;UID=...;PWD=...; OPTION=3;charset=utf8mb4;"
      set rs=conn.execute("select s_col, m_col from test_table")
      s=rs("s_col").value
      MsgBox "S (" & typename(s) &") " & s
      s=rs("m_col").value
      MsgBox "M (" & typename(s) &") " & s
      rs.close
      set rs=nothing
      conn.close
      set conn = nothing

      Expected behaviour

      • both S and M messages should show (String) + unicode emojis

      What happens

      • S - shows (String) + unicode emojis
      • M - shows (Empty)

      when charset is set to utf8 both columns returns ??

      Attachments

        Activity

          People

            Lawrin Lawrin Novitsky
            marek.srom Marek Šrom
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.