Skip to content

Commit

Permalink
Dump the character set as specified for the connection (#101)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
mpdude authored Aug 14, 2023
1 parent 481b94a commit 0abfaaa
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 106 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ If you want to use an environment variable for the DSN, replace the first parame

The DSN has to be in the following format:

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

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).
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).

### Optional parameters and command line switches

Expand Down
Loading

0 comments on commit 0abfaaa

Please sign in to comment.