diff options
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/common/sql.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index c83f80420..bc4f504c9 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2007/11/21 + * Fixed Sql_SetEncoding not setting the encoding of the connection + properly. (fixes bugreport:30) * Added backward compatible target 'conf' to the Makefile. [FlavioJS] * Changed Lif's Emergency Avoid to just get a normal skill delay (blocks all skills, cancelled by mapchange / re-summon) instead of diff --git a/src/common/sql.c b/src/common/sql.c index 5df751643..0f61cbe72 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -145,7 +145,9 @@ 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) { - return Sql_Query(self, "SET NAMES %s", encoding); + if( self && mysql_set_character_set(self->handle, encoding) ) + return SQL_SUCCESS; + return SQL_ERROR; } @@ -155,7 +157,7 @@ int Sql_Ping(Sql* self) { if( self && mysql_ping(&self->handle) == 0 ) return SQL_SUCCESS; - return SQL_ERROR; + return SQL_ERROR; } |