guilhermechapiewski/simple-db-migrate — pull request #23 by daltonmatos (2014-08-05 20:51:15+00:00)
Title: Fix sql encoding error when raising syntax error Exception

When simple-db-migrate finds a syntax error (but the original SQL contains non-ascii chars) a second exception is raised when building the syntax error Exception.

````python
statments = MySQL._parse_sql_statements(sql)
if len(sql.strip(' \t\n\r')) != 0 and len(statments) == 0:
raise Exception("invalid sql syntax '%s'" % sql)
````

The problem is that ``sql`` is ``unicode``, but when the string interpolation occurs the codec used is ``ascii``. We must cal ``sql.encode("utf-8")`` before mergind its content with another ``str()``.

The same occurs inside the ``MigrationException`` when it tries to convert itself to ``str()``. I also made a similar change so I could write a test for this.