PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Ryan Lubke" <rlubke at SYBASE dot COM>
Subject: Re: Charactersets in CTlib
Date: Dec 15 1999 2:23PM

Dan,

You should be able to specify the desired charset in the connection
properties.  Take a look at this section from the online man page:

"$dbh = Sybase::CTlib->ct_connect($user [, $passwd [, $server [,$appname,
[{attributes}]]]])
Establishes a connection to the database engine. Initializes and allocates
resources for the connection, and registers the user name, password, target
server and application name.

The attributes hash reference can be used to add private attributes to the
connection handle that you can later use, and can also be used to set
certain connection properties.

To set the connection properties you pass a special hash in the attributes
parameter:


        $dbh = new Sybase::CTlib 'user', 'pwd', 'SYBASE', undef,
                   { CON_PROPS => { CS_HOSTNAME => 'kiruna',
                                    CS_PACKETSIZE => 1024,
                                    CS_SEC_CHALLENGE => CS_TRUE }
                   };

The following connection properties are currently recognized:

CS_HOSTNAME
CS_ANSI_BINDS
CS_PACKETSIZE
CS_SEC_APPDEFINED
CS_SEC_CHALLENGE
CS_SEC_ENCRYPTION
CS_SEC_NEGOTIATE
See the Sybase documentation on how and when to use these connection
properties.

In addition, you can set the CS_SYB_LANG and CS_SYB_CHARSET properties in
the same manner. However - you should be aware that these settings affect
all open connections, not just the one that you are openeing with this call
to ct_connect(). This behaviour will likely change in the future. "

Here is the URL to that information:
http://www.mbay.net/~mpeppler/Sybperl/sybperl.html#Sybase_CTlib

Regards,

Ryan Lubke

----- Original Message -----
From: Dan Johansson 
To: SybPerl Discussion List 
Sent: Wednesday, December 15, 1999 02:15
Subject: Charactersets in CTlib


> Hi,
>
> We are running our Sybase 11.9.2 Server on a HP-UX server.
> The server is installed using the iso_1 characterset.
>
> If I use 'isql -Uxxx -Pxxx -J iso_1'  to do a select from sometable
> all special characters come out right.
>
> BUT if I use SybPerl:CTlib all my selects will be returned in
> roman_8 (default for HP).
>
> How can I configure SybPerl:CTlib so it will return the
> data in iso_1?
>
> file://Dan
>
> ======================================================================
> Dan Johansson
> Mr Music Production GmbH
> Fuerstenriederstr. 279a
> D-81377 Munich
> Germany
> mailto:Dan.Johansson@mrmusic.de
> ----------------------------------------------------------------------
>                         *** Don't drink and root! ***
>          This message is printed on 100% recycled electrons!
> ======================================================================
>
>