[DBAL-243] setCharset raises an error when using pdo_sqlite Created: 25/Mar/12  Updated: 05/Jul/12  Resolved: 05/Jul/12

Status: Resolved
Project: Doctrine DBAL
Component/s: Drivers
Affects Version/s: 2.2.1
Fix Version/s: 2.3
Security Level: All

Type: Bug Priority: Major
Reporter: Timo A. Hummel Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


When I attempt to use setCharset("utf8") with pdo_sqlite, this fails.

I know that pdo_sqlite doesn't support SET NAMES utf8, however, this should be caught by the driver (like: throwing a NotSupportedException) or simply ignore setCharset (mainly because if you allow the user to choose their backend, developers don't need to introduce special cases for driver handling).

Comment by Benjamin Eberlei [ 05/Jul/12 ]

Removed Connection#setcharsetSQL() - Use DriverManager::getConnection(array('charset' => 'UTF8', ...)); instead.

Generated at Wed Apr 01 16:46:05 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.