|
Posted by deciacco on 07/11/06 15:30
Discovered more information:
I changed my code from using
$dbh = DB::connect("mssql://sa:password@192.168.0.1/northwind"); to
simply using the freetds connection
putenv("FREETDSCONF=/etc/freetds.conf");
$db=mssql_connect("MyServer2k","sa","password");
(freetds.conf setting)
[MyServer2k]
host = 192.168.0.1
port = 1433
tds version = 8.0
when the script runs now I get this error:
Warning: mssql_query() [function.mssql-query]: WARNING! Some
character(s) could not be converted into client's character set.
Unconverted bytes were changed to question marks ('?'). (severity 16)
in /var/www/test/testing/index.php on line 31
Same problem just wanted to add to it for other to see.
deciacco wrote:
> Thank you all for the reply...
>
> How do I flatten into an 8-bit encoding...?
>
>
> Chung Leong wrote:
> > eugenio@iatmgu.com wrote:
> > > Hi...not sure if this is the right group for this posting, but i'm
> > > don't know where else to post. I've got a simple problem...I have a
> > > linux box running apache 2.0 and php5. I'm trying to use the mssql
> > > functions in php to retreive data from a mssql server 2k. I'm pulling
> > > data from the customers table in the northwind db and i'm getting
> > > strange characters instead of special characters. Below is a sample
> > > output:
> >
> > The text columns in the Northwind database are all nvarchar/ntext--i.e.
> > Unicode. These have to be flatten into an 8-bit encoding, since the
> > libraries used by the mssql extension can't handle Unicode (nor can PHP
> > itself for that matter).
> >
> > On Windows, I believe the encoding is determined by the current locale.
> > On Linux, it's set in freetds.conf.
[Back to original message]
|