select a table by field with non English characters lazarus / 16-Databases ---------------------------------------------------------------------- mrkwlee · 2019-12-18 09:25 when  select * from mytable where myfield like '甲%' ,error of convert coding is thrown out to halt the program. I have tried to use UTF8Encode but it still does not work.  If I replace '甲%' with any English  words like 'A%', it works. database coding UTF8 My system is: win 10, Lazarus 2.0.6 , firebird 3, zeoslib 7, I have google for 2 hours and got no answer. Please help me. ---------------------------------------------------------------------- tonyw · 2019-12-18 11:24 Have you checked to ensure that the database connection is also using UTF8 encoding? This is separate from the default database character set. It's probably also worth checking to ensure that the table column character set is also UTF8. ---------------------------------------------------------------------- mrkwlee · 2019-12-19 01:26 thank you. my connection code base is already UTF8. I tried to set it to none yesterday, it works. However, another problem come out is var   s: string; begin   s:='甲%';   QZquery1.SQL.Text:='select * from mutable where desc like '      +s; .... end; gives the same error as before. I think the data type of s makes the problem. still not solved ---------------------------------------------------------------------- winni · 2019-12-19 01:55 Hi! First for debugging support: U+7532 甲 E794B2  // hex 15176882 //decimal 甲 // HTML Belonging to the "monster" block  CJK Unified Ideographs. Think about this: If every component on the way from the database to the screen tries to decode UTF8 then it has to give some rubbish or exception. Try to decode a a decoded utf8 char (string). It must crash somehow. So check that only one component does a decode and the other only gives a rawstring to the next. Winni ---------------------------------------------------------------------- mrkwlee · 2019-12-19 08:28 thank you very much for your debug help. It is solved by setting  zconnection codepage to none        and clientcodepage to cpUTF8.