Skip to content

Commit 0abfaaa

Browse files
authored
Dump the character set as specified for the connection (#101)
Since the `utf8` value has been deprecated in MySQL, it is advisable to append `?charset=utf8mb4` to DSNs. This change makes sure the selected character set is also written to the SQL output, since it determines the encoding in which data was received by `slimdump`.
1 parent 481b94a commit 0abfaaa

File tree

3 files changed

+116
-106
lines changed

3 files changed

+116
-106
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ If you want to use an environment variable for the DSN, replace the first parame
3737

3838
The DSN has to be in the following format:
3939

40-
`mysql://[user[:password]@]host[:port]/dbname`
40+
`mysql://[user[:password]@]host[:port]/dbname[?charset=utf8mb4]`
4141

42-
For further explanations have a look at the [Doctrine documentation](http://doctrine-orm.readthedocs.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url).
42+
For further explanations have a look at the [Doctrine documentation](https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html#connecting-using-a-url).
4343

4444
### Optional parameters and command line switches
4545

0 commit comments

Comments
 (0)