-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding issues with emojis on MySQL database when using load_data_local_infile #332
Comments
Thanks, Eric. Is the following relevant? |
Thank you for the quick response! My tables are in utf8mb4 — I checked the create statement for table_name_here. The default character set for my database + schema are both utf8mb4. My MySQL server version is 8.0.35 That makes sense with why this write works when load_data_local_infile is set to FALSE. And it's also why the error message is so weird — cause i've double- and triple-checked and the encodings are utf8mb4. I think that whatever is happening in the load_data_local_infile step is somehow encoding the data as utf8mb3? |
Thanks. With https://stackoverflow.com/a/75421637/946850, it becomes apparent that Lines 61 to 68 in 24e2520
is wrong and should be |
Here you are! |
Thanks for the PR! |
I am writing a data set with emojis in it to a MySQL database. When the load_data_local_infile flag is set to TRUE (which is necessary for speed purposes), the write fails due to encoding issues. When the load_data_local_infile flag is not called or set to FALSE, the write succeeds, but goes much slower.
I have triple-checked the encoding in all other places — the MySQL database, the connection, the R file itself. All are encoded to utf-8, and can be written normally if the load_data_local_infile flag isn't used. This is also an issue that I didn't have on the old RMySQL package.
I also tried specifying the charset or the encoding in the dbConnect() stage, but that didn't seem to do anything. This is driving me crazy, please help.
The text was updated successfully, but these errors were encountered: