php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35730 mssql didn't use the right character encoding in freetds.conf
Submitted: 2005-12-19 02:29 UTC Modified: 2005-12-21 23:46 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:0 of 1 (0.0%)
From: liang at saga-city dot com Assigned: fmk (profile)
Status: Closed Package: MSSQL related
PHP Version: 5.1.1 OS: FreeBSD
Private report: No CVE-ID: None
 [2005-12-19 02:29 UTC] liang at saga-city dot com
Description:
------------
php5 mssql didn't use character encoding specify in freetds.conf ( alwasy use ISO-8559-1 , seen in freetds.log )

switch to php4 , everythings works fine


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-19 03:27 UTC] fmk@php.net
All encoding is handled by freetds in both PHP4 and PHP5. Execpt for internal PHP stuff the mssql extension is the same for PHP4 and PHP5.

You need to change the encoding in freetds.conf.
 [2005-12-19 05:48 UTC] liang at saga-city dot com
we have been testing the mssql extension 
both in PHP4 and PHP5.1.1, " with the same freetds.conf "

        tds version = 8.0
        client charset = BIG-5


In php4, it works fine, but not in php5.1.1 
( our old system uses php5.0.3 also work fine in the "same" freetds.conf )
 [2005-12-19 18:12 UTC] sniper@php.net
Are you absolutely sure you're linking PHP with the same freetds library as you did with PHP 4?
 [2005-12-20 01:37 UTC] liang at saga-city dot com
We have some production machines with PHP5.0.3/FreeBSD5.4/FreeTDS0.62.4 installed, All works great.

Now we are setting a clean and new FreeBSD 6.0 system box
with only freetds-0.63 mysql5.0-client and apache22 installed. It's obvious testing PHP4/PHP5 installation link to the same freetds library.
 [2005-12-20 02:41 UTC] fmk@php.net
Please try to upgrade to the latest CVS version of FreeTDS.

As I mentioned before all the encoding stuff is handled by FreeTDS. There is no encoding handling in the code for the PHP extension and the code differences between version 4, 5.0, 5.1 and 6.0 of PHP are only related to internal PHP stuff and has nothing to do with how the library is used.

 [2005-12-20 09:43 UTC] liang at saga-city dot com
new FreeTDS(0.64)CVS makes no difference.

Both PHP4/PHP5.1.1 call to the same 
Shared object "libsybdb.so.5" and using the same freetds.conf.

It's obvious PHP5.1.1 behaves different.
Sorry, I have some production machines to take care for the time being. Will not get back on this issuses shortly. Hopefully the problem will be solved soon.

Cheers,
 [2005-12-20 10:57 UTC] sniper@php.net
How about a short reproducing script too?
 [2005-12-21 11:01 UTC] boonkit at gmail dot com
I also facing the same problem. If using PHP4, PHP5.0.4 or PHP5.0.5, the non-western character from MSSQL can display correctly. If using PHP5.1.1, all character become ???????

FreeTDS version is 0.63
 [2005-12-21 23:46 UTC] fmk@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

I was wrong, sorry. The extension code for PHP 5.1 and 6.0 included a hardcoded character set. This is now changed so it will use the character set specified in freetds.conf or allow the script to overwrite this value.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC