Dear fellow users, I'm tying to load strings that contain emojis via DI Studio (SAS 9.4) into a MySQL database. I understand that MySQL is a bit tricky when it comes to character sets but I changed the target table to utf8mb4 which definitely stores emojis. When I use the table loader transformation to append my datasets to the table in the database it returns an "invalid utf8 character string" error. Here's what I have tried: 1. check the character sets for all parts of the procedure: my data come from jsons and are loaded via the json libname engine. They are correctly stored in a SAS work table. The mysql library is set to utfbmb4 and so is the mysql table. 2. test the database: when inserted through mysql workbench the emojis are stored just fine. The error only occurs if I use the SAS table loader. 3. check different modes of loading the data: a) If I delete the mysql table, then recreate it and manually set it to utf8mb4 prior to running the load job the character set is reset to utf-8, thus causing the error. b) If I set the table to utf8mb4, then enter a record manually and run the load job afterwards, the table character set isn't reset and the original record is unaffected. The table loader still returns the same error though. c) If I delete the mysql table and then let SAS create a new one by running the table loader the new table is set to utf-8 and again the same error shows. So this seems to be a problem with how the table loader works. Does anybody know a solution to this?
... View more