-
Notifications
You must be signed in to change notification settings - Fork 300
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
utf8mb4 character problem #73
Comments
Could you please create a dump with mysqldump, so i can reproduce the
|
Of course http://tny.cz/d9db67e0 false)); $dump->start('ydk/'.time().'.sql'); ?> |
Thanks, but I was expecting to see the output from the original mysqldump
|
Ok this is the original mysqldump result http://tny.cz/b3b2ad7a using with "mysqldump -u root bagislar2 > c:/mysql.sql" |
This is utf8mb4 original mysqldump "mysqldump --default-character-set=utf8mb4 -u root bagislar2 > c:/mysql.sql" |
Problem solved by deleting this line https://github.com/ifsnop/mysqldump-php/blob/master/src/Ifsnop/Mysqldump/Mysqldump.php#L181 First, I change this line to $this->dbHandler->exec("SET NAMES utf8mb4"); and it worked Also I changed the https://github.com/ifsnop/mysqldump-php/blob/master/src/Ifsnop/Mysqldump/Mysqldump.php#L223 $this->compressManager->write($this->getDumpFileHeader()); However i cant create sql file without bom signature but it worked so far(i believe) And I know, this is not a global solution :) |
I have added a new option to the dumpSettings array. You could now specify character encoding when connecting, just like mysql/mysqldump does with "default-character-set". When using "utf8mb4", there will be support for the four byte utf8 character encoding. There is a new test that ensures that utf8mb4 columns are correctly dumped. Please test this fix, as it could depend in configuration settings from my.cnf (it tries not to do so) pd.- Until mysql sets the default connection mode to utf8mb4, mysqldump-php will use utf8. |
I prefer not to add the BOM signature since it is not needed for utf8 file reading, and won't fix the issue with database dumps. |
I tried to dump this character properly but it allways return ? ? ?
🎭
🎲
🐈
My friend, can show me hot to solve this problem?
My DB sql
http://tny.cz/a17994ec
The text was updated successfully, but these errors were encountered: