Tag Archives: MySQL

Zato MySQL Connection with UTF-8

Today this error appeared in an Zato Service:

UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2019' in position 1: ordinal not in range(256)

I turns out that SQLAlchemy defaults to latin-1 encoding instead of UTF-8 for MySQL connections.

Thanks to Andrea on a Zato Thread here: https://mailman-mail5.webfaction.com/pipermail/zato-discuss/2015-November/001443.html points out that we can just add
dbname?charset=utf8 in the WebUI.

While not intuitive, it does work.
I added it, had the service try the action again and all was well in the world again.