Pita/ueberDB — Issue #9: utf8 problems
Author: elijh
Created: 2012-02-18 02:01:51+00:00
State: open

It seems that either ueberDB should create MySQL databases that are utf8, or it should more gracefully handle utf8 input.

By default, ueberDB creates tables with latin1 encoding and latin1_bin collation. If I give etherpad-lite a non-latin pad name, etherpad-lite dies with this error:

```
Error: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_unicode_ci,COERCIBLE) for operation '='
at Function._packetToUserObject (/srv/etherpad-lite/node_modules/ueberDB/node_modules/mysql/lib/client.js:387:11)
at Query._handlePacket (/srv/etherpad-lite/node_modules/ueberDB/node_modules/mysql/lib/query.js:33:33)
at Client._handlePacket (/srv/etherpad-lite/node_modules/ueberDB/node_modules/mysql/lib/client.js:312:14)
at Parser. (native)
at Parser.emit (events.js:67:17)
at /srv/etherpad-lite/node_modules/ueberDB/node_modules/mysql/lib/parser.js:71:14
at Parser.write (/srv/etherpad-lite/node_modules/ueberDB/node_modules/mysql/lib/parser.js:576:7)
at Socket. (native)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:347:14)
```

Running this fixed the problem:

```
ALTER DATABASE `etherpad-lite` CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE `store` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
```