Skip to content
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

Connection charset not applied when loading fixtures #314

Open
nzurita opened this issue Apr 16, 2020 · 0 comments
Open

Connection charset not applied when loading fixtures #314

nzurita opened this issue Apr 16, 2020 · 0 comments

Comments

@nzurita
Copy link

nzurita commented Apr 16, 2020

In Symfony 4.4, I have a fixture load class, and execute it via bin/console doctrine:fixtures:load --append. The values loaded in database are incorrectly encoded.

The database and tables are UTF8. The text file containing the loader is also UTF8 encoded, the connection is supposed to be configured as UTF8 (maybe the syntax for this changed in latter versions?).

These are some relevant parts of my code:

The string in the loader script (note the euro symbol):

$documentContent = [ 'content' => 'Lorem ipsum %CONTRACT_AMOUNT% €'];

File config/packages/doctrine.yaml:

doctrine:
    dbal:
        url: '%env(resolve:DATABASE_URL)%'
        charset: "utf8"

Values in database:

Lorem ipsum %CONTRACT_AMOUNT% �

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant