Hi,
I have issue with writing to database of UTF8 characters.
When I run the code on my windows dev machine everything is ok.
When the code is compiled and run on Ubuntu it writes data like this - ТеÑÑ ÑеÑÑ
Lazarus 4.2 (rev lazarus_4_2) FPC 3.2.2 x86_64-win64-win32/win64
mysql Ver 8.0.41-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
May be someone faced such an issue before.
I set this at the beginning of the program
SetMultiByteConversionCodePage(CP_UTF8);
Also
function TDBConnectionPool.CreateConnection: TSQLConnection;
var
Con: TMySQL80Connection;
begin
Con := TMySQL80Connection.Create(nil);
Con.HostName := ConnectionDef.HostName;
Con.Port := ConnectionDef.Port;
Con.DatabaseName := ConnectionDef.DatabaseName;
Con.UserName := ConnectionDef.UserName;
Con.Password := ConnectionDef.Password;
Con.CharSet := ConnectionDef.CharSet; // This is 'utf8mb4';
Con.KeepConnection := True;
Con.Connected := True;
Result := Con;
end;