浏览代码

Fixed bugreport:5154 http://rathena.org/board/tracker/issue-5154-sql-setencoding

Lilith- 11 年之前
父节点
当前提交
80074e90e3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/common/sql.c

+ 1 - 1
src/common/sql.c

@@ -167,7 +167,7 @@ int Sql_GetColumnNames(Sql* self, const char* table, char* out_buf, size_t buf_l
 /// Changes the encoding of the connection.
 int Sql_SetEncoding(Sql* self, const char* encoding)
 {
-	if( self && mysql_set_character_set(&self->handle, encoding) == 0 )
+	if( self && Sql_Query(self, "SET NAMES %s", encoding) == 0 )
 		return SQL_SUCCESS;
 	return SQL_ERROR;
 }