1

I'm currently developing a Spring Boot App with MariaDB as a Database. My localhost is a Windows 10 installation and the production server is a AWS Linux (first gen) image.

On localhost I have a local MariaDB installation. On production I have a AWS RDS instance running MariaDB, default parameters.

Currently the problem I facing is the following, I'm trying to save the following characters ["↑", "↓", "→", "←"] to DB. On localhost characters are save as excepted. On the production server characters are saved as "?". Both DB's have the same mysqldump file.

I already debugged both Spring instances and they both receive parameters as intended.

Any ideas?

Extra 1:

The only big difference between both instance is that localhost runs with the ./mvnw command while the production site is a generated jar running inside a Docker container.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
HFR1994
  • 536
  • 1
  • 5
  • 16

1 Answers1

1

In utf8 (or utf8mb4), those characters are hex E28691 E28693 E28692 E28690

See "question mark" in Trouble with UTF-8 characters; what I see is not what I stored for an explanation of the step you failed to do.

In addition, check for ?useUnicode=yes&characterEncoding=UTF-8 in the getConnection() call.

Rick James
  • 135,179
  • 13
  • 127
  • 222
  • Ok so I checked the encoding issue, I did a full table restructure with utf8mb4 additionally I had to add some parameters such as the innodb_large_prefix (https://stackoverflow.com/questions/43379717/how-to-enable-large-index-in-mariadb-10/43403017) in order to get indexes working. Lastly I converted every String received using "new String(data, StandardCharsets.UTF_8)" . Finally after all that process I got it working. – HFR1994 Jun 18 '18 at 17:36
  • 5 choices on the 767 problem: http://mysql.rjweb.org/doc.php/limits#767_limit_in_innodb_indexes – Rick James Jun 18 '18 at 18:55