Skip to Content.
Sympa Menu

freetds - [freetds] client Czech charset name unrecognized

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Milan Vobecky" <Milan.Vobecky AT diskus.cz>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] client Czech charset name unrecognized
  • Date: Fri, 15 Jul 2005 13:27:33 +0200

Hi,

I've following problem with connecting to my Sybase db through php.

On my FC3 I compile:
freetds-0.62.1 ,php-4.3.11,httpd-2.0.54
php:./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/a
pxs --with-sybase-ct=/usr/local/freetds --with-gd --with-zlib-dir=/usr/inclu
de --with-mysql
freetds:./configure --prefix=/usr/local/freetds --enable-msdblib --enable-sy
base-compat
apache:./configure --prefix=/usr/local/apache --enable-so

Configuration:
freetds.conf:
[SYBASE]
host = 192.168.1.200
port = 5000
tds version = 5.0
client charset = CP852
//data in sybase have charset cp852

I wrote test script:
<?php
require("common.inc.php");
// pripojeni k databazi
$conn = sybase_connect("$DB_SERVER", $DB_LOGIN, $DB_PASSWORD) or die ("No
connection to DB!");
$db = @sybase_select_db($DB) or die("Can't connect to DB");
$rs = sybase_query("SELECT D3000S.DIA2ZZ00.AKTUALNI_STAV FROM
D3000S.DIA2ZZ00 WHERE NAHRADNI_ARTIKL = '$kod' AND NO_SKLADU = '05'");
$row = sybase_fetch_array($rs);
$stav = $row["AKTUALNI_STAV"];
echo "Stav 05: ".$stav." ks";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="cs" lang="cs">
<head>
<meta http-equiv="PRAGMA" content="NO-CACHE" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
</head>
<body>
<form action="index.php" method="get">
<input type="text" name="kod" size="20">
<input type="submit" name="search" value="Hledej">
</form>
</body>
</html>

I test connection with tsql and all is OK. But when I test connection
through php I can't obtain data. I look to freetds.log and find this:

iconv to convert client-side data to the "CP852" character set
13:08:24.945237 tds_iconv_info_init: client charset name "" unrecognized.

I thing that it is the main problem but I can't solve it.

Is there anybody who can help me.

Milan
-----------------------------------------------------------------
Milan Vobecký, DiS.
Diskus, spol. s r.o.
Sokolovská 154, 180 00 Praha 8
tel: +420266315401
fax:+420266315399
gsm: +420777817065
milan.vobecky AT diskus.cz
www.diskus.cz







Archive powered by MHonArc 2.6.24.

Top of Page