I'm trying to store Hebrew in a MySQL table - but I end up seeing question marks. I'm using a Python flask server. I believe character sets and collation are set correctly (here is the output for running 'show create table':
CREATE TABLE
some_table
(some_field
varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
My SQLALCHEMY_DATABASE_URI is:
'mysql://username:password@localhost/database?charset=utf8'
The data which I insert into the table is initially received within a Python view function, and I process it as follows:
data = request.get_json()
some_field = data['some_field'].encode('utf-8')
I then insert the "some_field" object into the some_field column.
Note: When I try printing the some_field variable to the Python console I also see a gibberish string, but I assume that's because the console itself can't display Hebrew (not sure if this is causing the problem)...