Merge pull request #9314 from Icinga/latin1

IDO MySQL: reason latin1 charset for actually UTF-8 bytes
This commit is contained in:
Alexander Aleksandrovič Klimov 2022-04-04 11:05:12 +02:00 committed by GitHub
commit f749c7556e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -266,6 +266,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)