Hello,
I am trying to store some Cyrillic info into the MySQL database. But whatever I am trying, the info is replaced with a question mark.
Just after the connection, I am executing this query to set everything to UTF-8
PS: I also try utf8mb4
var utf = Sql.Builder.Append("SET NAMES 'utf8'");
_mySql.Query(utf, _mySqlConnection, result => {});
In creating the desired table I am using:_mySql.ExecuteNonQuery(
Sql.Builder.Append(
"CREATE TABLE `" + config.Info.DbName + "`.`" + config.Info.Table +
"` ( `Indexed` BIGINT NOT NULL AUTO_INCREMENT , `Type` VARCHAR(4) NULL , `AdminName` VARCHAR(40) NULL , `TargetName` VARCHAR(40) NULL , `TargetSteamID` BIGINT NULL , `TargetIP` VARCHAR(15) NULL , `Time` INT NULL , `Reason` VARCHAR(200) NULL , PRIMARY KEY (`Indexed`)) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"),
_mySqlConnection);
But when I am inserting info using
_mySql.Insert(
Sql.Builder.Append(
"INSERT INTO `" + config.Info.Table +
"` (`Indexed`, `Type`, `AdminName`, `TargetName`, `TargetSteamID`, `TargetIP`, `Time`, `Reason`) VALUES (NULL, 'Mute', 'moi', 'ПТтЧЦХЫЭ', 'ID', '*.*.*.*', NULL, 'test')"),
_mySqlConnection);
And the result is

Does anyone have some more tips I can try?