oleghnidets / OHMySQL

Swift + MySQL = ❤️
https://oleghnidets.github.io/OHMySQL/documentation/ohmysql/
MIT License
235 stars 42 forks source link

Question about auto detect encoding #5

Closed goodman-capu closed 7 years ago

goodman-capu commented 7 years ago

My database's charset is UTF8MB4, when I use OHMySQL to connect to the database, it says: [INFO] New character set: utf8 It seems that it can't tell the difference between different 'kinds' of UTF-8? I get error when try to insert or update emoji into the database. If I manually executeSET NAMES UTF8MB4 after connected to the database, it will work properly.

It's really a tough task to write an SQL driver😂

oleghnidets commented 7 years ago

Hmm... Looks like on UTF-8MB4 is MySQL-specific encoding and iOS can still use UTF-8. I will add this encoding to the enum CharsetEncoding. Thanks for reporting ;]

oleghnidets commented 7 years ago

Hi there, Take a look at release 1.0.2.