Page 1 of 1
ZeosLIB and Sybase ASE 12
Posted: 26.12.2005, 15:24
by Viktor_Zh
Hello.
ZeosLib - the great instrument for using with native sybase client library. But I have one problem.
I need open table on Sybase ASE 12.0 Server, then contains Cyrrilic symbols (code page Win cp1251). But symbols are displayed like not recognized (hieroglyphs).
Dear developers, please fix this bug.
My table you can see in file with this message.
Thank you,
Best regards,
Viktor
Odessa, Ukraine.
Mery Christmas!
Posted: 29.12.2005, 10:43
by MarkusD
Hello Viktor,
I must admit that i don't have any knowledge of Sybase ASE. ASA or SQL Anywhere Studio is a completely different product besides the similarities in the name. It also uses a different connection type in Zeos ( TDS based DBLib used in Sybase ASE and MS SQL versus Embedded SQL DBLib used in ASA which is more like Interbase/Firebird). But i will try to help you as much as i can.
But to hopefully get down to the source of the problem i definitely need more information.
What is the codepage ( collation it is called in ASA) of your DB?
What is the codepage of your client?
What connection string or settings are you using to connect to your DB?
In Sybase ASA it's possible to let the db client convert the characters to the appropriate codepage ( CharSet connection parameter). It defaults to the codepage used on the client. I took a quick look through the ZDbcDBLib.pas and saw that there are two connection options: language and codepage ( useable in the Properties property of the connection component). Did you try them out?
It doesn't look that ZeosLib makes any conversion so it has to ( or has not to) happen in the Sybase client.
Best Regards,
Markus Dütting
Posted: 29.12.2005, 13:52
by Viktor_Zh
Hello Markus.
All paremeters in my Sybase Client are present in file locates.dat, it use default language and codepage - us_english and iso_1. I try other direct Sybase components, they call Asedac, and CTLibComps.
Asedac not in sale at this day, it useless for me, cause don't have component 'Table'.
CTLibComps avalable on
http://www.geocities.com/ctlibcomps/ctlibcomps.htm
Without sources it's free.
So, with this components cyrillic simbols are fine.
But I prefer ZeosLib, cause it is universal and convenient tool.
See your personal message box.
Thank you, Markus.
Viktor.
Posted: 30.12.2005, 12:17
by MarkusD
Hello Viktor,
please don't use a personal message as long as others could benefit from your ( or mine) reply. That's the reason for a forum isn't it?
Did you try to set the connection options language and codepage in Properties of ZConnection?
I don't know the values you can use there, perhaps you can find them in the ASE documentation.
If i understood you correctly than you are using the codepage 850 in your database and codepage 1252 on your windows client? The codepage 1252 doesn't contain all cyrillic characters ( as well as 850), the windows codepage for the cyrillic alphabet is 1251 ( the iso would be 8859-5).
So the question is how did you save ( what codepage) this text in the db?
Does the codepage 850 contain the needed characters ( take a look at wikipedia)?
Are they displayed correctly in Sybase ISQL?
Using a codepage in the db which doesn't match the wished characters is a guarantee for problems. As already said the Zeos components don't make a character conversion, you need to find the correct settings for your sybase client, if the codepage of your db doesn't match the one used on the clients. Please try to fiddle around with the connection options i already mentioned above and if that doesn't help, you should try to post the ordinal code of your characters as you get them from your db with Zeos and CTLib ( Ord).
Best Regards,
Markus Dütting
Posted: 30.12.2005, 12:36
by Viktor_Zh
Markus!
All OK! I have entered following code in ZConnection properties:
Code: Select all
Language=us_english
codepage=iso_1
And Hurrah! All simbols is fine!
Thank You for your help, Markus!
Happy New Year and Merry Christmas!