We\'re building a Symfony2 app that\'s using an Oracle database. All the data in the DB is encoded as WE8ISO8859P15 (iso-8859-1), and all the website is encoded as utf-8.
You are able to set encoding of connection to your oracle
db in config.yml
. In your case you should set connection encoding to UTF-8
and Oracle
should handle all conversion between UTF-8
(website) and iso-8859-1
(db) encoding. So putting this configuration in your config.yml should be enough:
doctrine:
dbal:
default_connection: oracle
connections:
oracle:
driver: %ora_database_driver%
host: %ora_database_host%
port: %ora_database_port%
dbname: %ora_database_name%
user: %ora_database_user%
password: %ora_database_password%
charset: UTF8