Page 1 of 1

Problems with UTF8 in ZeosLib 6.5.1

Posted: 06.11.2006, 14:47
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.

Posted: 06.11.2006, 16:13
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

Posted: 06.11.2006, 16:27
by sohei
I use zeosdbo-6.5.1-alpha rev113.
Is it possible that new version 6.6.0-beta will work correct?

Posted: 06.11.2006, 18:11
by mdaems
Not likely... 113 is quiterecent and Ican't remember bugs solved in this domain.

Mark

Posted: 06.11.2006, 22:46
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.

Posted: 07.11.2006, 07:40
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.

Posted: 01.03.2007, 11:20
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.