Problems with UTF8 in ZeosLib 6.5.1

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
sohei
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 06.11.2006, 14:35

Problems with UTF8 in ZeosLib 6.5.1

Post by sohei »

Hello!
I can't insert UTF8 text in MySQL 5.0 database. All inserted Russians or Latvians symbols are ? in database.
I set CodePage=utf8 in ZConnection1.Properties but it don't help me.
But I can read utf8 information from database normally.
Can you help me?
Sorry for my English.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi,

Can you tell us exactly what version you are using? Is it the old 6.5.1 alpha version or the new 6.6.0-beta? Just to make sure what we're talking about as your topic title suggests a possibly old version.

Unfortunately I can't help you myself as I never used charactersets/encodings and the like.

Mark
sohei
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 06.11.2006, 14:35

Post by sohei »

I use zeosdbo-6.5.1-alpha rev113.
Is it possible that new version 6.6.0-beta will work correct?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Not likely... 113 is quiterecent and Ican't remember bugs solved in this domain.

Mark
DHelper
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 09.09.2006, 22:00

Post by DHelper »

Hi!
sohei, do you use AnsiToUtf8 function to convert strings to UTF-8 encoding before inserting them or may be some other method?

Sorry for my English.
sohei
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 06.11.2006, 14:35

Post by sohei »

DHelper wrote:Hi!
sohei, do you use AnsiToUtf8 function to convert strings to UTF-8 encoding before inserting them or may be some other method?

Sorry for my English.
Yes. I use UTF8Encode function. This function convert WideString to UTF8. I have information in WideString variables.
mefisto112
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 28.02.2007, 20:22

Post by mefisto112 »

I have the same problem with 6.6.1 version and CodePage=utf8.

Where do you put UTF8Encode / UTF8Decode functions?

If I try WideShowMessage(UTF8Decode(TntDbEdit1.Text)) it works, but i want populate ZTable and ZQuery with corrects values and also write to MySQL utf8 fields!
Perhaps ZeosDevTeam can provide a new ZConnection.Properties regarding this conversion support that IMO is often necessary.
Post Reply