TSQLQuery+ Upper + special symbols lazarus / 16-Databases ---------------------------------------------------------------------- lacux · 2013-01-15 21:03 Today I found out this... Is this bug or it is ok? I have database (firebird) in UTF-8 Encoding... So... In VD_VENDORS_ALL table I have column VENDOR_TYPE and there is few records with type = 'Uzņēmums' if I search data like this: Code: [Select]  sql_vd_f_data_validation.SQL.Add('SELECT * FROM VD_VENDORS_ALL WHERE UPPER(VENDOR_TYPE) = UPPER(''Uzņēmums'')'); Then no data will be found Works only Code: [Select]  sql_vd_f_data_validation.SQL.Add('SELECT * FROM VD_VENDORS_ALL WHERE UPPER(VENDOR_TYPE) = UPPER(''UZŅĒMUMS'')'); or   sql_vd_f_data_validation.SQL.Add('SELECT * FROM VD_VENDORS_ALL WHERE VENDOR_TYPE = ''Uzņēmums'''); Have you ideas where could be a problem? Because, if I do the same code Upper(column_name)/Upper(small) in FlameRobin software - all works well... ---------------------------------------------------------------------- goodname · 2013-01-15 21:38 I don't know why but have read that for UTF8 it is better to use lower. This is a general unicode issue. SELECT * FROM VD_VENDORS_ALL WHERE LOWER(VENDOR_TYPE) = LOWER(''Uzņēmums'') ---------------------------------------------------------------------- lacux · 2013-01-16 06:34 Ou, ok ... Thanks, I will try, just haven't think so far yet, that alternative for upper is lower , as in my Firebird manual was just Upper