Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (s
Posted Debm.Zhang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (s相关的知识,希望对你有一定的参考价值。
php 连接 sqlserver 时, 程序生成的sql语句, 如果在 sqlserver客户端执行时, 可以正确返回结果, 在程序中执行, 总返回 false, 打开调试也没有任何错误。 无意中发现了如题所示的错误, 处理办法如下:
- Chang the version in
/etc/freetds.conf
from 4.2 to 8.0 (if the PHP server is *nix) - client charset = GBK
php.ini 配置
mssql.charset = "UTF-8"
参考: http://www.php.net/manual/en/function.mssql-query.php 查询关键词为 Unicode data in a Unicode-only
https://stackoverflow.com/questions/5414890/mssql-query-issue-in-php-and-querying-text-data/5414970#5414970
以上是关于Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (s的主要内容,如果未能解决你的问题,请参考以下文章
Convert CString to ANSI string in UNICODE projects
计算机科学-ASCII, Unicode & UTF-8 (in Python)
“Unicode Error ”unicodeescape" codec can't decode bytes… Cannot open text files in Python 3
Python_报错:SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in posit
How to configure locales to Unicode in a Docker Ubuntu 14.04 container?