[SOLVED] UTF8 with zeos access and TDBEdit (Data control) lazarus / 16-Databases ---------------------------------------------------------------------- gelinp · 2016-08-18 07:43 Hi, I'm using a database with UTF8 charset encoding. I find into a forum the solution to add Tzconnection property with : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i codepage=UTF-8 and Lazarus add automaticaly the other property : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i controls_cp=CP_UTF8 The display looks fine, specifics french characters look good with phpmyadmin (UTF8 charset) and my interface. But now, if I want to edit database fields I use a TDBEdit control into a specific edit formula. I don't know itfdata access controls are from zeos or SQLDb components but it look like they doesn't care about UTF8. After edition with my application interface, phpmyadmin display bad characters like this into my database : Image dans les médias And If I refresh my application interface I can see other bad characters... I tested to modify charset encoding to font property of TDBGrid with UNICODE, but nothing changed. So do you have any idea to active utf8 with Data controls : TDBEdit ... Thank you Patrick ---------------------------------------------------------------------- JuhaManninen · 2016-08-18 08:13 QuoteMy configuration is : Lazarus 1.4.4 / FPC 3.0.0 / Debian GNU/Linux 8 (jessie) Please update to Lazarus 1.6. ---------------------------------------------------------------------- gelinp · 2016-08-18 11:23 OK, I upgraded to lazarus 1.6RC2. Also I removed ~/.lazarus directory and I resintalled zeos compents. I cleaned and rebuilded all lazarus environment then my project. The problem is next than old version : My application interface display well formed characters but my sql database still display not suited utf8 characters ! You can see bad charcaters with phpmyadmin screencast linked to this response. I verified all my database table are utf8 charset with utf8_general_ci intercalsment. Also server mysql is utf8 by default with PhpMyAdmin interface... TZconnection (zeos component) use property : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i codepage=UTF-8controls_cp=CP_UTF8 All TDBEdit components use DEFAULT_CHARSET into Font charset property from object inspector. I tested with UNICODE but nothing changed... ---------------------------------------------------------------------- Thaddy · 2016-08-18 11:26 You updated tp RC2? Plz do what Juha says and update to the release..... OMG ---------------------------------------------------------------------- gelinp · 2016-08-18 12:12 Ok, Ok, now I'm with lazarus 1.6, and zeos component 7.1.4 (stable release) : same problem with lazarus 1.6RC2, and lazarus 1.7 ! Note :  a lot of dublicates units compiling my project (see screencast attached). It looks lazarus try to compile source code of component attached to the project and it find a same already compiled unit from same component compiled at install time to lazarus environment... ---------------------------------------------------------------------- balazsszekely · 2016-08-18 12:26 Quotecodepage=UTF-8Shouldn't be codepage=UTF8? ---------------------------------------------------------------------- gelinp · 2016-08-18 12:44 it is  ! Thanks a lot, I was looking for yersturday... So the correct solution is to add TZconnection property: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i codepage=UTF8controls_cp=CP_UTF8 And use DEFAULT_CHARSET to all font charset property. Thanks again. Now all is fine