bigpresh / Dancer-Plugin-Database

Dancer::Plugin::Database - easy database support for Dancer applications
http://search.cpan.org/dist/Dancer-Plugin-Database
37 stars 36 forks source link

Automatically enable UTF-8 if charset: UTF-8 is set #6

Closed bigpresh closed 13 years ago

bigpresh commented 13 years ago

If Dancer's charset setting is set to UTF-8, automatically enable UTF-8, if we know how to do that for the DBMS in use.

For MySQL, execute: "SET NAMES 'utf8'", "SET CHARACTER SET 'utf8'"

For Postgres, https://gist.github.com/820759

bigpresh commented 13 years ago

See also RT #65779 : https://rt.cpan.org/Ticket/Display.html?id=65779

bigpresh commented 13 years ago

I've just released 1.11_01 as a developer release, containing code to automatically enable UTF-8 if the application's charset is UTF-8 and the DB driver is SQLite, Pg or mysql.

I'd greatly appreciate any feedback from anyone who can test how well this works for them. Assuming all is well, I'll release this as 1.20 soon.

bigpresh commented 13 years ago

I've had confirmation that this works, and CPAN testers reports are positive, so version 1.20 containing this feature has just been released.