androidu
androidu

Reputation: 4718

Inserting text with diacritics with Doctrine ORM using SQL Server 2005/2008

I am having a problem inserting text with diacritics in the database, the diacritics get removed and normal characters show up instead (a, t, s), the only one that gets inserted is î. The column type is TEXT - Doctrine and NVARCHAR in SQL Server, and the charset: UTF8 in the config file. Also I am using Symfony2.

How can I set up Doctrine so the diacritics get inserted properly?

I tried adding options.1002: "SET NAMES 'UTF8'" but I only get php warnings that say:

Warning: PDO::__construct(): SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes

Upvotes: 0

Views: 316

Answers (1)

Sascha Rambeaud
Sascha Rambeaud

Reputation: 297

Please keep in mind, that the collation used does not only determine how similar characters are treated, but also which characters are allowed. Your problem may be as simple as using a wrong collation.

Upvotes: 1

Related Questions