[CONJ-406] MariaDB Driver (mariadb-java-client-1.4.6.jar) got an issue when inserting chinese string Created: 2017-01-04 Updated: 2017-01-25 Resolved: 2017-01-25 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.4.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Thinh Pham | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
RHEL |
||
| Attachments: |
|
| Description |
|
Hi Team, 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, |
| Comments |
| Comment by Thinh Pham [ 2017-01-12 ] | ||||||||||||
|
Thanks Diego and when will this version release? I have checked and the latest version is 1.5.6? Thanks you so much, | ||||||||||||
| Comment by Diego Dupin [ 2017-01-12 ] | ||||||||||||
|
Hi thinh, MariaDB Driver exchanges with server are using exclusively UTF-8. I've execute your jar, and results where ok. And the best would be to send results of query "show variables like '%character%'" to understand: And can you indicate more information :
| ||||||||||||
| Comment by Thinh Pham [ 2017-01-20 ] | ||||||||||||
|
Thanks Diego, Java version: openjdk version "1.8.0_111" Are there any option or property to set for a specific connection to fix this issue? Thanks, | ||||||||||||
| Comment by Diego Dupin [ 2017-01-20 ] | ||||||||||||
|
character_set_connection latin1 ? that doesn't seem normal. I would get ride of those "init_connect" :
The good way to set that is set charset information by dedicated variables : _extract from 10.1 default configuration file _
you normally don't have to set them at all, since latin 1 is default. After that, normally all must be allright, but If you want to change default information, you can use option "sessionVariables". | ||||||||||||
| Comment by Thinh Pham [ 2017-01-23 ] | ||||||||||||
|
Thank Diego so much!! Thanks, | ||||||||||||
| Comment by Diego Dupin [ 2017-01-25 ] | ||||||||||||
|
For ODBC, better to ask in https://jira.mariadb.org/projects/ODBC/, or support directly |