Problem select with special characters.

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
userbr
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 26.07.2009, 00:44

Problem select with special characters.

Post 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.
eltoncarbo
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 03.08.2010, 13:20
Location: Brasil
Contact:

Post by eltoncarbo »

Adjust in ZConnection properties the following:
codepage=UTF8
client_encoding=UTF8

Sorry my bad english....
userbr
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 26.07.2009, 00:44

Post 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.
odney
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 20.05.2011, 11:56

Same problem

Post 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
ism
Zeos Test Team
Zeos Test Team
Posts: 202
Joined: 02.10.2010, 20:48

Post 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
userbr
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 26.07.2009, 00:44

Post 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.
Last edited by userbr on 02.06.2011, 14:42, edited 1 time in total.
ism
Zeos Test Team
Zeos Test Team
Posts: 202
Joined: 02.10.2010, 20:48

Post by ism »

Maybe problem with locales .
In what encoding working your program Delphi XE?

climb all possible client encoding
Lazarus 1.0.8 fpc 2.6.0
userbr
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 26.07.2009, 00:44

Post 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.
Locked