-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Describe the bug
String values returned by Connection.getinfo() are string representations of utf_16_le bytes.
To reproduce
>>> import mssql_python
>>> cnxn = mssql_python.connect(
... "SERVER=192.168.0.199;"
... "DATABASE=test;"
... "UID=scott;PWD=tiger^5HHH;"
... "TrustServerCertificate=yes;"
... )
>>> driver_ver = cnxn.getinfo(mssql_python.SQL_DRIVER_VER)
>>> type(driver_ver)
<class 'str'>
>>> driver_ver
'1\x008\x00.\x000\x005\x00.\x000\x000\x000\x001'
Expected behavior
Return a normal Unicode string.
Further technical details
Python version: 3.13
SQL Server version: SQL Server 2019
Operating system: Client - Windows 11; Server - Docker container
Metadata
Metadata
Assignees
Labels
No labels