# Character Sets and rake db:test:prepare

**URL:** <https://www.ruby-forum.com/t/character-sets-and-rake-dbprepare/114291>\
**Category:** Rails\
**Created:** [September 10, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/character-sets-and-rake-dbprepare/114291 "2007-09-10T23:23:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geoffrey\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/57b2e6/32.png) [@Geoffrey\_W](https://www.ruby-forum.com/u/Geoffrey_W)\
**Post date:** [September 10, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/character-sets-and-rake-dbprepare/114291/1 "2007-09-10T23:23:51Z")

</div>

As far as I can tell, if I’m using MySQL and I set the character set  
and collation on my databases when I create them (e.g. CREATE DATABASE  
project\_development CHARACTER SET utf8 COLLATION utf8\_general\_ci),  
when I run db:test:prepare it’ll lose that information because  
db:test:purge drops and recreates my database without bothering to  
check what my character set and collation actually are.

This seems like something other people would have tripped over by now,  
but google searches aren’t turning anything up. Thoughts?

- Geoffrey
