Page 1 of 1

Problem select with special characters.

Posted: 24.05.2011, 20:49
by userbr
Please.

When I run the select below, the word "Cotação" appears "Cotação" with ZQuery

Select case flag when 'T' then 'Cotação' else 'Pedido' end as type_ped, name_cli from vendor

The field flag is already set to win1252 charset.

The parameter of ZConnection has codepage = win1252

The name_cli field returns the correct content.

Wonder what is wrong?

thanks.

Posted: 25.05.2011, 14:07
by eltoncarbo
Adjust in ZConnection properties the following:
codepage=UTF8
client_encoding=UTF8

Sorry my bad english....

Posted: 25.05.2011, 15:24
by userbr
Thanks, but did not work.
Tried with win1252 but neither worked.
To save the changes to the database, it also changes the characters.

Same problem

Posted: 25.05.2011, 16:56
by odney
Same prob.
I try uppercase lowercase, remove and add each property and none seems to work.
de "ç" char keep strange.
The word in question is "Praça"

If i try f_character(231) on the select it works(but icant do it on each select i do.).

News: Read(select) is correct, post(inser,update) shows weird chars.

Can someone help please?

Follow the DFM.
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Form1'
ClientHeight = 243
ClientWidth = 472
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object DBEdit1: TDBEdit
Left = 256
Top = 32
Width = 121
Height = 21
DataField = 'TESTE'
DataSource = DataSource1
TabOrder = 0
end
object ZConnection1: TZConnection
Properties.Strings = (
'codepage=WIN1252'
'client_encoding=WIN1252'
'lc_ctype=WIN1252'
'server_encoding=WIN1252')
TransactIsolationLevel = tiReadCommitted
Connected = True
Protocol = 'firebirdd-2.0'
HostName = '127.0.0.1'
Database = 'TESTE.fdb'
User = 'TESTE'
Password = 'TESTE'
Left = 40
Top = 24
end
object ZQuery1: TZQuery
Connection = ZConnection1
Active = True
SQL.Strings = (
'select prod.*, '#39'pra'#231'a'#39' as TESTE from produtos prod')
Params = <>
Left = 152
Top = 24
object ZQuery1TESTE: TWideStringField
FieldName = 'TESTE'
ReadOnly = True
Size = 6
end
end
object DataSource1: TDataSource
DataSet = ZQuery1
Left = 224
Top = 80
end
end

Posted: 25.05.2011, 21:40
by ism
try

in client
codepage = win1252 ( encoding your client program ) The encoding must support your language

and in Firebird database table fields in UTF8

Or use Lazarus :) there all in UTF8

Posted: 31.05.2011, 20:57
by userbr
The Zeos with Delphi XE and Firebird definitely still not working properly. I tried everything, even created a test database with UTF8 and did not work.

Posted: 01.06.2011, 20:09
by ism
Maybe problem with locales .
In what encoding working your program Delphi XE?

climb all possible client encoding

Posted: 02.06.2011, 15:05
by userbr
I working win1252.
On parameters of ZConnection:

codepage=win1252
client_encoding=win1252

With the Delphi 2006 and Zeos 6.6.5 worked correctly.