mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
2 more tries to force DB to respond in UTF8 (fixes #1599)
This commit is contained in:
parent
a4e2130342
commit
ea093f6d39
|
@ -112,6 +112,7 @@ bool CSqlServer::Connect()
|
||||||
connection_properties["OPT_WRITE_TIMEOUT"] = 20;
|
connection_properties["OPT_WRITE_TIMEOUT"] = 20;
|
||||||
connection_properties["OPT_RECONNECT"] = true;
|
connection_properties["OPT_RECONNECT"] = true;
|
||||||
connection_properties["OPT_CHARSET_NAME"] = sql::SQLString("utf8mb4");
|
connection_properties["OPT_CHARSET_NAME"] = sql::SQLString("utf8mb4");
|
||||||
|
connection_properties["OPT_SET_CHARSET_NAME"] = sql::SQLString("utf8mb4");
|
||||||
|
|
||||||
// Create connection
|
// Create connection
|
||||||
{
|
{
|
||||||
|
@ -123,6 +124,9 @@ bool CSqlServer::Connect()
|
||||||
// Create Statement
|
// Create Statement
|
||||||
m_pStatement = m_pConnection->createStatement();
|
m_pStatement = m_pConnection->createStatement();
|
||||||
|
|
||||||
|
// Apparently OPT_CHARSET_NAME and OPT_SET_CHARSET_NAME are not enough
|
||||||
|
m_pStatement->execute("SET CHARACTER SET utf8mb4;");
|
||||||
|
|
||||||
if (m_SetUpDB)
|
if (m_SetUpDB)
|
||||||
{
|
{
|
||||||
char aBuf[128];
|
char aBuf[128];
|
||||||
|
|
Loading…
Reference in a new issue