PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #1812

sybase_connect - 4th parameter (charset) is never used

Details

Submitted2004-07-07 08:56 UTC
Fromagoralski at certum dot pl
Assigneddanielc
StatusClosed
PackageDB
PHP VersionIrrelevant
OSLinux RedHat 9.0
Roadmaps(Not assigned)

Comments

[2004-07-07 08:56 UTC] agoralski at certum dot pl

Description:
------------
In the php function sybase_connect one can pass the 4th parameter to that function, to change the db charset.

But in Pear DB/sybase.php there is no way to pass that parameter.

Reproduce code:
---------------
When looking at the DB/sybase.php there is:

$conn = @$connect_function($interface, $dsninfo['username'], $dsninfo['password']);

So there's no way to pass the 4th parameter (charset) to sybase_connect or sybase_pconnect.

I think it should be changed to:

$conn = @$connect_function($interface, $dsninfo['username'], $dsninfo['password'], $dsninfo['charset']);

So it would be possible to pass the charset this way:
$dsn='sybase://user:pass@host/db?charset=iso88592';

[2004-08-09 13:04 UTC] e_chavelin at yahoo dot com

Is it possible to implement this functionality with mssql? Or is there a way for php to connect to mssql using the conf file of freetds (freetds.conf)?