IDO MySQL: reason latin1 charset for actually UTF-8 bytes

This commit is contained in:
Alexander A. Klimov 2022-03-31 18:10:21 +02:00
parent 245fbad1e5
commit 11b8d0f058
1 changed files with 3 additions and 0 deletions

View File

@ -262,6 +262,9 @@ void IdoMysqlConnection::Reconnect()
BOOST_THROW_EXCEPTION(std::bad_alloc());
}
/* Read "latin1" (here, in the schema and in Icinga Web) as "bytes".
Icinga 2 and Icinga Web use byte-strings everywhere and every byte-string is a valid latin1 string.
This way the (actually mostly UTF-8) bytes are transferred end-to-end as-is. */
m_Mysql->options(&m_Connection, MYSQL_SET_CHARSET_NAME, "latin1");
if (enableSsl)