|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-03-15 16:49 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-03-15 16:49 UTC] cmb@php.net
[2021-03-15 17:19 UTC] sergiopaternoster73 at gmail dot com
[2021-03-15 17:42 UTC] sergiopaternoster73 at gmail dot com
[2021-03-15 17:47 UTC] cmb@php.net
[2021-03-15 18:08 UTC] sergiopaternoster73 at gmail dot com
[2021-03-15 20:53 UTC] cmb@php.net
-Status: Feedback
+Status: Open
-Assigned To: cmb
+Assigned To:
[2021-03-15 20:53 UTC] cmb@php.net
[2021-03-16 07:22 UTC] sergiopaternoster73 at gmail dot com
[2021-03-16 10:14 UTC] sergiopaternoster73 at gmail dot com
[2021-03-16 12:08 UTC] sergiopaternoster73 at gmail dot com
[2021-03-16 12:26 UTC] sergiopaternoster73 at gmail dot com
[2021-03-16 16:11 UTC] sergiopaternoster73 at gmail dot com
[2021-03-17 17:17 UTC] sergiopaternoster73 at gmail dot com
[2021-03-18 08:38 UTC] sergiopaternoster73 at gmail dot com
[2021-03-18 13:30 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2021-03-18 13:30 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 19:00:01 2025 UTC |
Description: ------------ I have an SQL Server 2012 table that contains all NVARCHAR columns. With PHP 7.3/7.4 I can read both ASCII and UNICODE characters from the table by running this query: SELECT CAST([NAME] AS NVARCHAR(MAX)) AS [Name] FROM [Table]. With php-8.0.3 I can still read ASCII results (plain English, for example) but not UNICODE anymore (Chinese characters, in my case). I use php-8.0.3 with FreeTDS on Linux Ubuntu. In PHP 7.3/7.4 works well! Test script: --------------- ``` $query = "SELECT CAST([NAME] AS NVARCHAR(MAX)) AS [Name] FROM [Table]"; $pdo = new PDO("odbc:MyConnection","MyUser","MyPassword"); $rs = $pdo->query($query); $result = $rs->fetchColumn(); file_put_contents("result.txt",$result); $pdo = null; ``` /etc/odbc.ini settings [MyConnection] Description = "Data Warehouse" Port = 1433 Driver = FreeTDS Description = SQL Server Trace = No Server = my.server.com Database = AB TDS_Version = 8.0 Client_Charset = UTF-8 ApplicationIntent = ReadOnly Expected result: ---------------- Readable Unicode (Chinese, in my case) characters (like it is in PHP 7) Actual result: -------------- Unreadable characters