ZeosLIB and Sybase ASE 12

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

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Viktor_Zh
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 26.12.2005, 14:09

ZeosLIB and Sybase ASE 12

Post 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!
You do not have the required permissions to view the files attached to this post.
MarkusD
Zeos Dev Team
Zeos Dev Team
Posts: 20
Joined: 28.08.2005, 03:40
Location: Ingolstadt

Post 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
Viktor_Zh
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 26.12.2005, 14:09

Post 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.
MarkusD
Zeos Dev Team
Zeos Dev Team
Posts: 20
Joined: 28.08.2005, 03:40
Location: Ingolstadt

Post 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?

Code: Select all

Language=
codepage=
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
Viktor_Zh
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 26.12.2005, 14:09

Post 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! :mrgreen:
Thank You for your help, Markus! :thanks:
Happy New Year and Merry Christmas! :kid:
Post Reply