My flutter app uses REST API implemented in Java Spring Boot application, which connects to Mysql database. The Text fields in the app accept multilingual text and that text is being stored correctly in my local dev environment, which uses MySQL database. The charset and collation of my database is set to utf8 and utf8_general_ci. This is working fine. The non-english text stored by the app is being stored/retrieved in/from the db correctly and displayed correctly.
However, the same set up is not working when I moved the springboot app server to MariaDB instance running on my AWS EC2 (I am not using RDS database yet). The flutter app client is still on my local machine. The only difference is that instead of connecting to local REST API backend over HTTP, it is connecting to the server hosted on AWS over HTTPS. I created the db using this statement: CREATE DATABASE testing CHARACTER SET = 'utf8' COLLATE = 'utf8_general_ci';
The following statement shows that testing db has the right charset and collation: SELECT * FROM INFORMATION_SCHEMA.SCHEMATA;
+--------------+--------------------+----------------------------+------------------------+----------+
| CATALOG_NAME | SCHEMA_NAME | DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME | SQL_PATH |
+--------------+--------------------+----------------------------+------------------------+----------+
| def | information_schema | utf8 | utf8_general_ci | NULL |
| def | test | latin1 | latin1_swedish_ci | NULL |
| def | testing | utf8 | utf8_general_ci | NULL |
+--------------+--------------------+----------------------------+------------------------+----------+
Yet, the App gets back only ?????? whenever any non-english text is saved to the db. I have tried to drop and recreate database, recreate tables with utf8 charset but it is just not working. I checked using SHOW FULL COLUMNS FROM table_name; that the table columns use utf8_general_ci as well.
Any thoughts on what might be going on?