Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7181255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:31:12+00:00 2026-05-28T17:31:12+00:00

I am using Doctrine with Symfony2. My config.yml file looks something like this:- Doctrine

  • 0

I am using Doctrine with Symfony2.
My config.yml file looks something like this:-

Doctrine Configuration

doctrine:
    dbal:
        driver: %database_driver%
        host: %database_host%
        port: %database_port%
        dbname: %database_name%
        user: %database_user%
        password: %database_password%
        charset: UTF8

Unfortunately my tables are not collating to the UTF8_general_ci or UTF8_unicode_ci
I tried

collate: utf8_unicode_ci

But Doctrine2 didn’t recognize the option.

How can I achieve the same?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:31:12+00:00Added an answer on May 28, 2026 at 5:31 pm

    The charset: UTF8 option is just useful to ask Doctrine to execute SET NAMES UTF-8 on each page. I don’t have any specific configuration for Doctrine, and my tables are by default in utf8_general_ci InnoDB.
    Read this part of the documentation: https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/faq.html#how-do-i-set-the-charset-and-collation-for-mysql-tables, it answers your question:

    You can’t set these values inside the annotations, yml or xml mapping
    files. To make a database work with the default charset and collation
    you should configure MySQL to use it as default charset, or create the
    database with charset and collation details. This way they get
    inherited to all newly created database tables and columns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im using symfony with doctrine, and Im trying to generate the schema yml file
I'm using Symfony2 and Doctrine 2.0. I'm trying to read data from an XML
I'm currently breaking my head on a 1452 error (using Symfony2 with doctrine). Here
Using Symfony2 and Doctrine ODM with MongoDB, I need to access the parent document
I could use some help on this problem. I'm creating an application using Symfony2
I'm using Symfony2 components and Doctrine. Validation works great on server side (constraints in
Using Symfony2.0, I know well how to use the command doctrine:generate:entities to generate getters
I'm using Doctrine DBAL and wanting to do an INSERT ... ON DUPLICATE UPDATE
I am trying to create a weighted search using doctrine. This is how i
I am developing an application using symfony2 and using orm.yml files for mapping the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.