Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-406

MariaDB Driver (mariadb-java-client-1.4.6.jar) got an issue when inserting chinese string

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 1.4.6
    • N/A
    • Other
    • None
    • RHEL

    Description

      Hi Team,
      I got an issue when insert Chinese String into table. all Chinese string will be changed to ? after inserting.
      Ex: Create a table UTF8Test by following command:
      CREATE TABLE UTF8Test (Driver VARCHAR(256),UTF8colunm VARCHAR(256) NULL DEFAULT NULL COLLATE 'utf8_general_ci') COLLATE='latin1_swedish_ci'
      Then insert Chinese String into this table using MariaDB driver (mariadb-java-client-1.4.6.jar).
      Insert into UTF8Test values ('driver type', '中文不工作中文不工作');
      The String '中文不工作中文不工作' will be changed to '?????????' after inserting.
      There is no problem when i use MYSQL driver (mysql-connector-java-5.0.8-bin.jar).
      I also used "useUnicode=true&characterEncoding=UTF-8" on conection string, but cannot fix this issue.

      Attachment is my example code and my database config file. Could you help to fix this issue.

      One more thing, I take a check on MariaDB Connector/ODBC driver and got the same issue.

      Thanks and Best Regards,
      Thinh Pham

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            ThinhPham Thinh Pham
            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.