Recent

Author Topic: [SOLVED] Problems with accentuation - Lazarus 226 + MySQL 8.0  (Read 602 times)

Gercino

  • Newbie
  • Posts: 4
[SOLVED] Problems with accentuation - Lazarus 226 + MySQL 8.0
« on: November 29, 2023, 02:23:09 pm »
Hey guys,
Thank you for allowing me access to the forum.
I'm facing the following problem: When typing the word "Cão Caníl" (two accents) and exiting DBEDIT I ​​lose the formatting of the text.
But, if I insert the text directly into MYSQL I have no problem.
I've already tried changing the MySQL "collation" to "utf8" and it always returns to "uft8mb3"... I don't know if this is the problem, and for this reason I'm asking for help.

I have little experience, as you may have noticed. I'm looking to learn and exercise.

Obrigado (THKX) pela compreensão.

I'm using Win11 / Lazarus 2.6.6
MySQL8.0 (Default characterset = uft8mb3 / Default collation = utf8mb3_gerenal_ci)
« Last Edit: December 01, 2023, 01:02:18 am by Gercino »

Zvoni

  • Hero Member
  • *****
  • Posts: 2237
Re: Problems with accentuation - Lazarus 226 + MySQL 8.0
« Reply #1 on: November 29, 2023, 02:42:35 pm »
Charset of the Connection?
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Gercino

  • Newbie
  • Posts: 4
Re: Problems with accentuation - Lazarus 226 + MySQL 8.0
« Reply #2 on: November 29, 2023, 02:47:54 pm »
Charset of the Connection?

I'm trying like this in the event 'DataModuleCreate':
...
conexao.ClientCodePage:='utf8';
conexao.ControlsCodePage:=cCP_UTF8;
conexao.Properties.Add('codepage=UTF8');
...

Gercino

  • Newbie
  • Posts: 4
Re: Problems with accentuation - Lazarus 226 + MySQL 8.0
« Reply #3 on: December 01, 2023, 01:04:30 am »
Charset of the Connection?

I'm trying like this in the event 'DataModuleCreate':
...
conexao.ClientCodePage:='utf8';
conexao.ControlsCodePage:=cCP_UTF8;
conexao.Properties.Add('codepage=UTF8');
...

I managed to solve the problem.

a) MySQL8.0 = CHARACTER SET = utf8mb4 and COLLATE = utf8mb4_general_ci
b) IDE =  zconnection1.ControlsCodePage:=cCP_UTF8;

OK accent, and letter 'ç'

Thks

 

TinyPortal © 2005-2018