Re: MySQL 5 and special chars [SOLVED] lazarus / 16-Databases ---------------------------------------------------------------------- DanishMale · 2012-08-25 16:01 Hi when I perform an Query on mysql database I get this funny char (see attachment) Software info: lazarus 0.9.30.4  x64 on Windows 7 x64 MySQL Community Server (GPL) 5.5.18 on Windows Server 2003 RC2 x86 - MySQL codepage : UTF8 - Unicode the ? should be the letter å the code: Code: [Select]  DataSupplier.SQLQuery1.SQL.Text := 'SELECT * from tolk WHERE ID = ''' + SearchStr + '''';   try     DataSupplier.SQLQuery1.Active := True;     DataSupplier.SQLQuery1.First;     AppAppointInfoForm.Label1.Caption := DataSupplier.SQLQuery1.FieldByName('Adresse_1').AsWideString +                                          ', ' + DataSupplier.SQLQuery1.FieldByName('Adresse_2').AsWideString;     AppAppointInfoForm.Label2.Caption := DataSupplier.SQLQuery1.FieldByName('Postnr').AsWideString +                                          ' ' + DataSupplier.SQLQuery1.FieldByName('Bynavn').AsWideString;     AppAppointInfoForm.Label3.Caption := DataSupplier.SQLQuery1.FieldByName('Telefon').AsWideString;     AppAppointInfoForm.Label4.Caption := DataSupplier.SQLQuery1.FieldByName('Mobil').AsWideString;     AppAppointInfoForm.Label6.Caption := DataSupplier.SQLQuery1.FieldByName('Email').AsWideString;   finally     DataSupplier.SQLQuery1.Active := False;   end; ---------------------------------------------------------------------- ezlage · 2012-08-25 18:23 Friend, Just set the charset and collation in the ZConnection.Properties before of Active:=True; Example:       'character_set_client=utf8'#13#10+       'character_set_connection=utf8'#13#10+       'character_set_database=utf8'#13#10+       'character_set_results=utf8'#13#10+       'character_set_server=utf8'#13#10+       'character_set_system=utf8'#13#10+       'collation_connection=utf8_general_ci'#13#10+       'collation_database=utf8_general_ci'#13#10+       'collation_server=utf8_general_ci'#13#10+       'Codepage=utf8'; ---------------------------------------------------------------------- DanishMale · 2012-08-25 18:34 I'm using MySQLConnection 5.1 and used your advised and set CharSet := 'utf8' Thanx ---------------------------------------------------------------------- ezlage · 2012-08-25 19:02 Welcome! It is working now? ---------------------------------------------------------------------- DanishMale · 2012-08-25 19:05 Like a charm thanks to your hint in the correct direction ---------------------------------------------------------------------- ezlage · 2012-08-25 19:36