ponyorm / pony

Pony Object Relational Mapper
Apache License 2.0
3.66k stars 245 forks source link

Defining charset for tables #500

Open thmsklngr opened 4 years ago

thmsklngr commented 4 years ago

I just recognized that despite which charset I may use for my DB connection to y MxSQL server, the tables are created with an other charset.

I.e. I used the parameter charset='utf8mb4' for binding the database object to my MySQL instance and then called generate_mapping(). Result is that the entities are created with 'latin1'.

To be honest, I do not know if that may be the wrong place or not. If so, please let me know or forward this to those people maintaining pymysql.

Thanks in advance, regards, Thomas

ghost commented 4 years ago

To add to this issue, it's worth noting that PonyORM doesn't seem to let you choose the character encoding for SQLite either. I'm not sure as to what the default is.