Added SQL_SetCharset native to (re)set character set (bug 5999, r=ds).

This commit is contained in:
Arkshine
2014-04-18 22:04:32 +02:00
parent 19e160117f
commit 3d732bbbb6
12 changed files with 94 additions and 1 deletions

View File

@ -54,6 +54,22 @@ native SQL_FreeHandle(Handle:h);
native Handle:SQL_Connect(Handle:cn_tuple, &errcode, error[], maxlength);
/**
* Sets the character set of the current connection.
* Like SET NAMES .. in mysql, but stays after connection problems.
*
* If a connection tuple is supplied, this should be called before SQL_Connect or SQL_ThreadQuery.
* Also note the change will remain until you call this function with another value.
*
* Example: "utf8", "latin1"
*
* @param h Database or connection tuple Handle.
* @param charset The character set string to change to.
* @return True, if character set was changed, false otherwise.
*/
native bool:SQL_SetCharset(Handle:h, const charset[]);
/**
* Prepares a query.
* The query must always be freed.