ID: 27324 Updated by: [EMAIL PROTECTED] Reported By: markus dot amsler at oribi dot org Status: Bogus Bug Type: MSSQL related Operating System: Windows PHP Version: 4.3.4 New Comment:
Theis has nothing to do with PHP. It's a feature in the library used to create the MSSQL Extension. You can use a wrapper (php_win.exe) for php.exe (the C LI version) too launch it as an ANSI application. Previous Comments: ------------------------------------------------------------------------ [2004-02-20 00:48:21] [EMAIL PROTECTED] Feature. ------------------------------------------------------------------------ [2004-02-19 19:07:09] markus dot amsler at oribi dot org Description: ------------ I couldn't insert special characters like ������ into a MSSQL-Server. After some investigation I found the problem happens only if php gets called from CLI and if the SQL-Client Tools are installed on the client. The Problem was the Automatic ANSI to OEM conversion which per default is selected if the SQL-Client Tools are installed. After I disabled it in the SQL Server Client Configuration -> DB Library Options, the characters got inserted correctly. I found this note on http://www.schemamania.org/jkl/booksonline/SQLBOL70/html/1_client_20.htm that explains, why it's only happening in the Console: "Any clients running Windows NT or Windows 95/98 are considered ANSI clients. Console-based applications, such as the isql utility, are considered OEM clients." I'm not sure wether this behavior is a bug or a feature. Perhaps the mssql module could disable the Automatic conversion, so it would work out of the box on the console. It's related with this one (but not exactly the same) http://bugs.php.net/bug.php?id=11868 Reproduce code: --------------- mssql_connect ("192.9.122.108", "sa"); mssql_select_db ("umlaute"); $sq = "CREATE TABLE umlaute (id INT IDENTITY, value VARCHAR(255))"; mssql_query ($sq); $sq = "INSERT INTO umlaute (value) VALUES ('������')"; mssql_query ($sq); Expected result: ---------------- ������ in the database umlaute table umlaute Actual result: -------------- field value contains ������ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27324&edit=1
