Use UTF8 when escaping.

Whenever I tried to escape a string on a UTF8 connection, I got garbage back. This seems to fix the problem (but I'm not that familiar with coding in C).