mssql and latin characters

mssql and latin characters

am 21.01.2008 04:18:19 von Leticia Larrosa

Hello

I have a MSSql 2000 database that have stored data with the follow =
special
characters: =F3, =ED, =D1, =E1, =E9, =FA.=20
When I see the data through any MsSql Client I see exactly those =
characters.

The Collation of database is: SQL_Latin1_General_CP1_CI_AS
I can=92t change the method of insert data in database.

When I get (with MSSQL PHP extension) data that have some of those
characters, I get weird characters instead.

For example:=20
A data that in database appears as =93Gir=F3n=94 is obtained by PHP as =
=93Gir=A2n=94

The problem with the encoding of browser is discarded, because wherever =
I
saw the data appears with weird characters.

The code I use to get the data is:
mssql_connect('server','user','pass');
mssql_select_db('db');

$r =3D mssql_query(=93select some_column from some_table=94);
$d =3D mssql_fetch_assoc($r);

echo $d['some_column'];
?>

My PHP is 4.4.3, and my OS is XP.

Other people ask the same as I=92m and get no answer proper are:
http://www.psicofxp.com/forums/desarrollo-web.264/226703-php -mssql-y-acen=
tos
..html
http://www.bdat.net/cuestiones_php/php3/0702.html=20
http://www.forosdelweb.com/f18/problemas-con-caracteres-espe ciales-acento=
s-p
hp-mssql-server-364345/=20
http://markmail.org/message/7rksvz44sj2te5sl=20
http://www.phpbuilder.com/board/archive/index.php/t-10208269 .html


Thanks in advanced.
Leticia Larrosa



__________________________________________

Participe en Universidad 2008.
11 al 15 de febrero del 2008.
Palacio de las Convenciones, Ciudad de la Habana, Cuba
http://www.universidad2008.cu

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: mssql and latin characters

am 22.01.2008 21:24:42 von frank

Hi Leticia,

MS SQL server comes with a set of client tools that allows you to specify
the encoding. There is a checkbox in the Client Network Tool that allows
you to enable/disable OEM character conversion. Flipping that for the alias
you are using to connect to the database should fix the problem.

Remember this must be done on the box where PHP is running if that's
different from the SQL server box.

- Frank

> Hello
>
> I have a MSSql 2000 database that have stored data with the follow
special
> characters: ó, í, Ñ, á, é, ú.
> When I see the data through any MsSql Client I see exactly those
characters.
>
> The Collation of database is: SQL_Latin1_General_CP1_CI_AS
> I can’t change the method of insert data in database.
>
> When I get (with MSSQL PHP extension) data that have some of those
> characters, I get weird characters instead.
>
> For example:
> A data that in database appears as “Girón” is obtained by PHP as
“Gir¢n”
>
> The problem with the encoding of browser is discarded, because wherever
I
> saw the data appears with weird characters.
>
> The code I use to get the data is:
> > mssql_connect('server','user','pass');
> mssql_select_db('db');
>
> $r = mssql_query(“select some_column from some_table”);
> $d = mssql_fetch_assoc($r);
>
> echo $d['some_column'];
> ?>
>
> My PHP is 4.4.3, and my OS is XP.
>
> Other people ask the same as I’m and get no answer proper are:
>
http://www.psicofxp.com/forums/desarrollo-web.264/226703-php -mssql-y-acentos
> .html
> http://www.bdat.net/cuestiones_php/php3/0702.html
>
http://www.forosdelweb.com/f18/problemas-con-caracteres-espe ciales-acentos-p
> hp-mssql-server-364345/
> http://markmail.org/message/7rksvz44sj2te5sl
> http://www.phpbuilder.com/board/archive/index.php/t-10208269 .html
>
>
> Thanks in advanced.
> Leticia Larrosa
>
>
>
> __________________________________________
>
> Participe en Universidad 2008.
> 11 al 15 de febrero del 2008.
> Palacio de las Convenciones, Ciudad de la Habana, Cuba
> http://www.universidad2008.cu
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: mssql and latin characters

am 22.01.2008 23:59:55 von Leticia Larrosa

Hello Frank,

I fix the problem doing exactly what you tell me to do, after days of
headaches and testing with all kind of stuff.

Huge Thanks.

Regards
Leticia Larrosa

PD: You can't image how big the help you give me was.

-----Original Message-----
From: Frank M. Kromann [mailto:frank@kromann.info]=20
Sent: Tuesday, January 22, 2008 3:25 PM
To: Leticia Larrosa
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] mssql and latin characters

Hi Leticia,

MS SQL server comes with a set of client tools that allows you to =
specify
the encoding. There is a checkbox in the Client Network Tool that allows
you to enable/disable OEM character conversion. Flipping that for the =
alias
you are using to connect to the database should fix the problem.

Remember this must be done on the box where PHP is running if that's
different from the SQL server box.

- Frank

> Hello
>=20
> I have a MSSql 2000 database that have stored data with the follow
special
> characters: =F3, =ED, =D1, =E1, =E9, =FA.=20
> When I see the data through any MsSql Client I see exactly those
characters.
>=20
> The Collation of database is: SQL_Latin1_General_CP1_CI_AS
> I can=92t change the method of insert data in database.
>=20
> When I get (with MSSQL PHP extension) data that have some of those
> characters, I get weird characters instead.
>=20
> For example:=20
> A data that in database appears as =93Gir=F3n=94 is obtained by PHP as
=93Gir=A2n=94
>=20
> The problem with the encoding of browser is discarded, because =
wherever
I
> saw the data appears with weird characters.
>=20
> The code I use to get the data is:
> > mssql_connect('server','user','pass');
> mssql_select_db('db');
>=20
> $r =3D mssql_query(=93select some_column from some_table=94);
> $d =3D mssql_fetch_assoc($r);
>=20
> echo $d['some_column'];
> ?>
>=20
> My PHP is 4.4.3, and my OS is XP.
>=20
> Other people ask the same as I=92m and get no answer proper are:
>
http://www.psicofxp.com/forums/desarrollo-web.264/226703-php -mssql-y-acen=
tos
> .html
> http://www.bdat.net/cuestiones_php/php3/0702.html=20
>
http://www.forosdelweb.com/f18/problemas-con-caracteres-espe ciales-acento=
s-p
> hp-mssql-server-364345/=20
> http://markmail.org/message/7rksvz44sj2te5sl=20
> http://www.phpbuilder.com/board/archive/index.php/t-10208269 .html
>=20
>=20
> Thanks in advanced.
> Leticia Larrosa
>=20
>=20
>=20
> __________________________________________
>=20
> Participe en Universidad 2008.
> 11 al 15 de febrero del 2008.
> Palacio de las Convenciones, Ciudad de la Habana, Cuba
> http://www.universidad2008.cu
>=20
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>=20
>=20





__________ NOD32 2808 (20080120) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com




__________________________________________

Participe en Universidad 2008.
11 al 15 de febrero del 2008.
Palacio de las Convenciones, Ciudad de la Habana, Cuba
http://www.universidad2008.cu

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php