[socket cString],
0);
if (rc == NULL) {
- NSLog(@"WARNING: could not open MySQL4 connection to database '%@': %s",
+ NSLog(@"ERROR: could not open MySQL4 connection to database '%@': %s",
[adaptor databaseName], mysql_error(self->_connection));
mysql_close(self->_connection);
self->_connection = NULL;
return NO;
}
+ if (mysql_query(self->_connection, "SET CHARACTER SET utf8") != 0) {
+ NSLog(@"ERROR: could not put MySQL4 connection into UTF-8 mode: %s",
+ mysql_error(self->_connection));
+ mysql_close(self->_connection);
+ self->_connection = NULL;
+ return NO;
+ }
+
if (isDebuggingEnabled)
NSLog(@"MySQL4 connection established 0x%08X", self->_connection);