#24476 [Bgs]: Character translation in mssql_query
ID: 24476 User updated by: andrea dot balducci at antos dot it Reported By: andrea dot balducci at antos dot it Status: Bogus Bug Type: MSSQL related Operating System: WINXP / WIN2000 SRV PHP Version: 5.0.0b1 (beta1) New Comment: 1) Check the settings (Client Network Utility) on the machine running SqlServer (if your apps works with 2 or more servers (DB + Web)) 2) Check the collation of the colums Previous Comments: [2003-08-12 16:15:39] gusthac at cdlnet dot com dot br I am with the same problem and don't have fixed this one yet. Is there another solution to solve this question? I tried this one but I got nothing. Also I tried to use the code: but without success. If possible, I would like to know other solutions. Thanks. [2003-07-07 04:13:25] andrea dot balducci at antos dot it Done, Tnx. [2003-07-03 12:37:47] [EMAIL PROTECTED] I have tested the latest version of both php4 and php5 and I can't reproduce this problem. It sounds like you are using two different methods to access the database. When PHP is used with a web server the MSSQL extension will use codepage 125x (ANSI). When called from a command line the MSSQL extension uses the DOS code page (437 for US). The MS SQL Server client libraries can be configured to do an automatic ANSI to OEM conversion. If that option is enabled you will see the same characters from both web server and command line. If it is disabled the output will not look the same. [2003-07-03 05:04:11] andrea dot balducci at antos dot it Description: I'm trying to insert chars like ò à è é ì in a sql server 2K table. Sometimes the chars are traslated in others. Tryed with php 4.x and 5 Reproduce code: --- Table Sample: CREATE TABLE pippo ( [a] [text] COLLATE Latin1_General_CI_AS NULL , [b] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) Script sample: Expected result: Select * from pippo A B --- --- òàèéìù òàèéìù Actual result: -- Select * from pippo A B --- --- =ÓÞÚý¨ =ÓÞÚý¨ Using Sql Profiler i've discovered that the query issued to sql server by mssql_query has the characters already changed. So sql exec "INSERT INTO PIPPO (A,B) VALUES ('=ÓÞÚý¨','=ÓÞÚý¨')" -- Edit this bug report at http://bugs.php.net/?id=24476&edit=1
#24476 [Bgs]: Character translation in mssql_query
ID: 24476 User updated by: andrea dot balducci at antos dot it Reported By: andrea dot balducci at antos dot it Status: Bogus Bug Type: MSSQL related Operating System: WINXP / WIN2000 SRV PHP Version: 5.0.0b1 (beta1) New Comment: Done, Tnx. Previous Comments: [2003-07-03 12:37:47] [EMAIL PROTECTED] I have tested the latest version of both php4 and php5 and I can't reproduce this problem. It sounds like you are using two different methods to access the database. When PHP is used with a web server the MSSQL extension will use codepage 125x (ANSI). When called from a command line the MSSQL extension uses the DOS code page (437 for US). The MS SQL Server client libraries can be configured to do an automatic ANSI to OEM conversion. If that option is enabled you will see the same characters from both web server and command line. If it is disabled the output will not look the same. [2003-07-03 05:04:11] andrea dot balducci at antos dot it Description: I'm trying to insert chars like ò à è é ì in a sql server 2K table. Sometimes the chars are traslated in others. Tryed with php 4.x and 5 Reproduce code: --- Table Sample: CREATE TABLE pippo ( [a] [text] COLLATE Latin1_General_CI_AS NULL , [b] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) Script sample: Expected result: Select * from pippo A B --- --- òàèéìù òàèéìù Actual result: -- Select * from pippo A B --- --- =ÓÞÚý¨ =ÓÞÚý¨ Using Sql Profiler i've discovered that the query issued to sql server by mssql_query has the characters already changed. So sql exec "INSERT INTO PIPPO (A,B) VALUES ('=ÓÞÚý¨','=ÓÞÚý¨')" -- Edit this bug report at http://bugs.php.net/?id=24476&edit=1
#24476 [NEW]: Character translation in mssql_query
From: andrea dot balducci at antos dot it Operating system: WINXP / WIN2000 SRV PHP version: 5.0.0b1 (beta1) PHP Bug Type: MSSQL related Bug description: Character translation in mssql_query Description: I'm trying to insert chars like ò à è é ì in a sql server 2K table. Sometimes the chars are traslated in others. Tryed with php 4.x and 5 Reproduce code: --- Table Sample: CREATE TABLE pippo ( [a] [text] COLLATE Latin1_General_CI_AS NULL , [b] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) Script sample: Expected result: Select * from pippo A B --- --- òàèéìù òàèéìù Actual result: -- Select * from pippo A B --- --- =ÓÞÚý¨ =ÓÞÚý¨ Using Sql Profiler i've discovered that the query issued to sql server by mssql_query has the characters already changed. So sql exec "INSERT INTO PIPPO (A,B) VALUES ('=ÓÞÚý¨','=ÓÞÚý¨')" -- Edit bug report at http://bugs.php.net/?id=24476&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24476&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24476&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24476&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24476&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24476&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=24476&r=support Expected behavior: http://bugs.php.net/fix.php?id=24476&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=24476&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=24476&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24476&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24476&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24476&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24476&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=24476&r=gnused